diff --git a/server/configuration.ts b/server/configuration.ts index adb58fc..5807c47 100644 --- a/server/configuration.ts +++ b/server/configuration.ts @@ -24,6 +24,7 @@ export interface Config { watcher_role: string jf_admin_role: string announcement_channel_id: string + jf_collection_id: string } } export const config: Config = { @@ -56,6 +57,7 @@ export const config: Config = { workaround_token: process.env.TOKEN ?? "", watcher_role: process.env.WATCHER_ROLE ?? "", jf_admin_role: process.env.ADMIN_ROLE ?? "", - announcement_channel_id: process.env.CHANNEL_ID ?? "" + announcement_channel_id: process.env.CHANNEL_ID ?? "", + jf_collection_id: process.env.JELLYFIN_COLLECTION_ID ?? "" } } diff --git a/server/jellyfin/handler.ts b/server/jellyfin/handler.ts index 4bd5c67..7b3a202 100644 --- a/server/jellyfin/handler.ts +++ b/server/jellyfin/handler.ts @@ -236,7 +236,7 @@ export class JellyfinHandler { const searchParams: GetItemsRequest = { userId: liloJfUser?.id, - parentId: "f137a2dd21bbc1b99aa5c0f6bf02a805" // collection ID for all movies + parentId: this.config.bot.jf_collection_id // collection ID for all movies } const movies = (await (this.moviesApi.getItems(searchParams))).items?.filter(item => !item.isFolder) // logger.debug(JSON.stringify(movies, null, 2), { guildId: guildId, requestId })