fixed some formatting and added komga integration stuff

This commit is contained in:
2026-11-04 10:51:50 +00:00
parent 1c2c577280
commit 17708b3ae8
17 changed files with 366 additions and 81 deletions

View File

@@ -1,19 +1,23 @@
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: PageServerLoad = () => {
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
}
};
};