fixed some formatting and added komga integration stuff
This commit is contained in:
@@ -3,12 +3,13 @@ export const immutable = [];
|
||||
export const prerendered = [];
|
||||
|
||||
export const assets = [
|
||||
{"path":"robots.txt"},
|
||||
{"path":"adumh00man.png"}
|
||||
{"path":"adumh00man.png"},
|
||||
{"path":"robots.txt"}
|
||||
];
|
||||
|
||||
export const routes = [
|
||||
{"id":"/","page":true,"endpoint":false},
|
||||
{"id":"/artwork/[itemId]","page":false,"endpoint":true},
|
||||
{"id":"/books/[bookId]","page":false,"endpoint":true},
|
||||
{"id":"/posters/[itemId]","page":false,"endpoint":true}
|
||||
];
|
||||
8
.svelte-kit/generated/dev/env/config.js
vendored
8
.svelte-kit/generated/dev/env/config.js
vendored
@@ -25,7 +25,13 @@ export function set_env(env) {
|
||||
dynamic_private_env.JELLYFIN_USER_ID = JELLYFIN_USER_ID;
|
||||
const JELLYFIN_LIBRARY_ID = validate(variables, env.JELLYFIN_LIBRARY_ID, "JELLYFIN_LIBRARY_ID", issues);
|
||||
dynamic_private_env.JELLYFIN_LIBRARY_ID = JELLYFIN_LIBRARY_ID;
|
||||
const KOMGA_URL = validate(variables, env.KOMGA_URL, "KOMGA_URL", issues);
|
||||
dynamic_private_env.KOMGA_URL = KOMGA_URL;
|
||||
const KOMGA_API_KEY = validate(variables, env.KOMGA_API_KEY, "KOMGA_API_KEY", issues);
|
||||
dynamic_private_env.KOMGA_API_KEY = KOMGA_API_KEY;
|
||||
const KOMGA_LIBRARY_ID = validate(variables, env.KOMGA_LIBRARY_ID, "KOMGA_LIBRARY_ID", issues);
|
||||
dynamic_private_env.KOMGA_LIBRARY_ID = KOMGA_LIBRARY_ID;
|
||||
handle_issues(issues);
|
||||
}
|
||||
|
||||
set_env({JELLYFIN_URL:"http://192.168.1.180:8096",JELLYFIN_API_KEY:"2727181a933049dcbc8d63cf0bcc15f3",JELLYFIN_PLAYLIST_ID:"e3088b1ab54766ad3668bc71a574a2f7",JELLYFIN_USER_ID:"5824596713e44e8c949f529e1a081393",JELLYFIN_LIBRARY_ID:"a656b907eb3a73532e40e44b968d0225"});
|
||||
set_env({JELLYFIN_URL:"https://watch.voidarc.co.uk/",JELLYFIN_API_KEY:"2727181a933049dcbc8d63cf0bcc15f3",JELLYFIN_PLAYLIST_ID:"e3088b1ab54766ad3668bc71a574a2f7",JELLYFIN_USER_ID:"5824596713e44e8c949f529e1a081393",JELLYFIN_LIBRARY_ID:"a656b907eb3a73532e40e44b968d0225",KOMGA_URL:"https://manga.voidarc.co.uk",KOMGA_API_KEY:"29f80f81450346199c40802b6d099002",KOMGA_LIBRARY_ID:"0N4TC3WZ89BFM"});
|
||||
@@ -5,3 +5,6 @@ export const JELLYFIN_API_KEY = env.JELLYFIN_API_KEY;
|
||||
export const JELLYFIN_PLAYLIST_ID = env.JELLYFIN_PLAYLIST_ID;
|
||||
export const JELLYFIN_USER_ID = env.JELLYFIN_USER_ID;
|
||||
export const JELLYFIN_LIBRARY_ID = env.JELLYFIN_LIBRARY_ID;
|
||||
export const KOMGA_URL = env.KOMGA_URL;
|
||||
export const KOMGA_API_KEY = env.KOMGA_API_KEY;
|
||||
export const KOMGA_LIBRARY_ID = env.KOMGA_LIBRARY_ID;
|
||||
|
||||
@@ -3,5 +3,5 @@ globalThis.__sveltekit_dev = {
|
||||
env: {
|
||||
// empty
|
||||
},
|
||||
version: "1793733574808"
|
||||
version: "1793788577988"
|
||||
};
|
||||
@@ -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