From ece1550277ac81bb6aef681bf28e8dabeed31a8e Mon Sep 17 00:00:00 2001 From: bonswouar Date: Mon, 9 Dec 2024 21:27:29 +0100 Subject: [PATCH] fix(scanners): remove season request if unmonitored fix don't process season if unmonitored --- server/lib/scanners/sonarr/index.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/lib/scanners/sonarr/index.ts b/server/lib/scanners/sonarr/index.ts index d6b6c65a8..095578228 100644 --- a/server/lib/scanners/sonarr/index.ts +++ b/server/lib/scanners/sonarr/index.ts @@ -117,17 +117,17 @@ class SonarrScanner totalAvailableEpisodes === 0 ) { this.processUnmonitoredSeason(tmdbId, season); + } else { + processableSeasons.push({ + seasonNumber: season.seasonNumber, + episodes: !server4k ? totalAvailableEpisodes : 0, + episodes4k: server4k ? totalAvailableEpisodes : 0, + totalEpisodes: season.statistics?.totalEpisodeCount ?? 0, + processing: season.monitored && totalAvailableEpisodes === 0, + is4kOverride: server4k, + monitored: season.monitored, + }); } - - processableSeasons.push({ - seasonNumber: season.seasonNumber, - episodes: !server4k ? totalAvailableEpisodes : 0, - episodes4k: server4k ? totalAvailableEpisodes : 0, - totalEpisodes: season.statistics?.totalEpisodeCount ?? 0, - processing: season.monitored && totalAvailableEpisodes === 0, - is4kOverride: server4k, - monitored: season.monitored, - }); } await this.processShow(tmdbId, sonarrSeries.tvdbId, processableSeasons, {