From 6574e18516201bc11b5f0c422bf6b432c722e067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Bart=C3=ADk?= <63553146+sambartik@users.noreply.github.com> Date: Sat, 4 Jun 2022 18:07:14 +0200 Subject: [PATCH] fix(scan): ignore virtual seasons Virtual seasons appeared as available / partially available, even though they were not even shown in the Jellyfin web UI. For more info see #119 --- server/api/jellyfin.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/api/jellyfin.ts b/server/api/jellyfin.ts index f6f6cb9db..0753682ec 100644 --- a/server/api/jellyfin.ts +++ b/server/api/jellyfin.ts @@ -31,6 +31,7 @@ export interface JellyfinLibraryItem { Id: string; HasSubtitles: boolean; Type: 'Movie' | 'Episode' | 'Season' | 'Series'; + LocationType: 'FileSystem' | 'Offline' | 'Remote' | 'Virtual'; SeriesName?: string; SeriesId?: string; SeasonId?: string; @@ -251,7 +252,9 @@ class JellyfinAPI { try { const contents = await this.axios.get(`/Shows/${seriesID}/Seasons`); - return contents.data.Items; + return contents.data.Items.filter( + (item: JellyfinLibraryItem) => item.LocationType !== 'Virtual' + ); } catch (e) { logger.error( `Something went wrong while getting the list of seasons from the Jellyfin server: ${e.message}`,