added what im watching
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
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: PageServerLoad = () => {
|
||||
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