fixed some formatting and added komga integration stuff
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
"/artwork/[itemId]": [
|
||||
"src/routes/artwork/[itemId]/+server.ts"
|
||||
],
|
||||
"/books/[bookId]": [
|
||||
"src/routes/books/[bookId]/+server.ts"
|
||||
],
|
||||
"/posters/[itemId]": [
|
||||
"src/routes/posters/[itemId]/+server.ts"
|
||||
]
|
||||
|
||||
10
.svelte-kit/types/src/routes/books/[bookId]/$types.d.ts
vendored
Normal file
10
.svelte-kit/types/src/routes/books/[bookId]/$types.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import type * as Kit from '@sveltejs/kit';
|
||||
import { MatcherParam } from '@sveltejs/kit/params';
|
||||
|
||||
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
||||
type RouteParams = { bookId: string };
|
||||
type RouteId = '/books/[bookId]';
|
||||
|
||||
export type EntryGenerator = () => Promise<Array<RouteParams>> | Array<RouteParams>;
|
||||
export type RequestHandler = Kit.RequestHandler<RouteParams, RouteId>;
|
||||
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
|
||||
@@ -1,20 +1,24 @@
|
||||
// @ts-nocheck
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { getLatestPlaylistSong, getLatestWatchedSeries } from '#lib/server/jellyfin';
|
||||
import { JELLYFIN_PLAYLIST_ID, JELLYFIN_LIBRARY_ID } from '$app/env/private';
|
||||
import { getLatestBook } from '#lib/server/komga';
|
||||
import { JELLYFIN_PLAYLIST_ID, JELLYFIN_LIBRARY_ID, KOMGA_LIBRARY_ID } from '$app/env/private';
|
||||
|
||||
export const load = () => {
|
||||
const latestSong = getLatestPlaylistSong(globalThis.fetch, JELLYFIN_PLAYLIST_ID);
|
||||
console.log(JELLYFIN_LIBRARY_ID);
|
||||
const latestSeries = getLatestWatchedSeries(globalThis.fetch, JELLYFIN_LIBRARY_ID);
|
||||
const latestBook = getLatestBook(globalThis.fetch, KOMGA_LIBRARY_ID);
|
||||
|
||||
latestSong.catch(() => {});
|
||||
latestSeries.catch(() => {});
|
||||
latestBook.catch(() => {});
|
||||
|
||||
return {
|
||||
streamed: {
|
||||
latestSong,
|
||||
latestSeries
|
||||
latestSeries,
|
||||
latestBook
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user