Skip to content

Commit

Permalink
fix(scanners): remove season request if unmonitored fix
Browse files Browse the repository at this point in the history
don't process season if unmonitored
  • Loading branch information
bonswouar committed Dec 9, 2024
1 parent caaf13e commit ece1550
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions server/lib/scanners/sonarr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit ece1550

Please sign in to comment.