added what im watching
This commit is contained in:
@@ -4,5 +4,8 @@
|
||||
],
|
||||
"/artwork/[itemId]": [
|
||||
"src/routes/artwork/[itemId]/+server.ts"
|
||||
],
|
||||
"/posters/[itemId]": [
|
||||
"src/routes/posters/[itemId]/+server.ts"
|
||||
]
|
||||
}
|
||||
10
.svelte-kit/types/src/routes/posters/[itemId]/$types.d.ts
vendored
Normal file
10
.svelte-kit/types/src/routes/posters/[itemId]/$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 = { itemId: string };
|
||||
type RouteId = '/posters/[itemId]';
|
||||
|
||||
export type EntryGenerator = () => Promise<Array<RouteParams>> | Array<RouteParams>;
|
||||
export type RequestHandler = Kit.RequestHandler<RouteParams, RouteId>;
|
||||
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
|
||||
@@ -1,16 +1,20 @@
|
||||
// @ts-nocheck
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { getLatestPlaylistSong } from '#lib/server/jellyfin';
|
||||
import { JELLYFIN_PLAYLIST_ID } from '$app/env/private';
|
||||
import { getLatestPlaylistSong, getLatestWatchedSeries } from '#lib/server/jellyfin';
|
||||
import { JELLYFIN_PLAYLIST_ID, JELLYFIN_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);
|
||||
|
||||
latestSong.catch(() => {});
|
||||
latestSeries.catch(() => {});
|
||||
|
||||
return {
|
||||
streamed: {
|
||||
latestSong
|
||||
latestSong,
|
||||
latestSeries
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user