From 530be4272cce1b0d74d7f4156b8d794cda6ea03f Mon Sep 17 00:00:00 2001 From: Fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Date: Thu, 14 Mar 2024 03:11:53 +0500 Subject: [PATCH] fix(jellyfinscanner): conditionally assign the jellyfinMediaId and jellyfinMediaId4k (#686) Previously `jellyfinMediaId4k` was being assigned even if 4k server was not setup or even if 4k content were not present. This fixes it by conditionally assigning the jellyfinMediaId and JellyfinMediaId4k fix #681 --- server/lib/scanners/jellyfin/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/lib/scanners/jellyfin/index.ts b/server/lib/scanners/jellyfin/index.ts index 193882ed5..ee546fe74 100644 --- a/server/lib/scanners/jellyfin/index.ts +++ b/server/lib/scanners/jellyfin/index.ts @@ -461,8 +461,9 @@ class JellyfinScanner { tmdbId: tvShow.id, tvdbId: tvShow.external_ids.tvdb_id, mediaAddedAt: new Date(metadata.DateCreated ?? ''), - jellyfinMediaId: Id, - jellyfinMediaId4k: Id, + jellyfinMediaId: isAllStandardSeasons ? Id : undefined, + jellyfinMediaId4k: + isAll4kSeasons && this.enable4kShow ? Id : undefined, status: isAllStandardSeasons ? MediaStatus.AVAILABLE : newSeasons.some(