fix(sonarr-sync): sonarr sync will no longer set shows with no episodes to partially available

fixes #796
pull/802/head
sct 4 years ago
parent 72cffd74a7
commit d20bd530ed

@ -243,9 +243,19 @@ class JobSonarrSync {
isAllSeasons || shouldStayAvailable isAllSeasons || shouldStayAvailable
? MediaStatus.AVAILABLE ? MediaStatus.AVAILABLE
: media.seasons.some( : media.seasons.some(
(season) => season.status !== MediaStatus.UNKNOWN (season) =>
season[server4k ? 'status4k' : 'status'] ===
MediaStatus.AVAILABLE ||
season[server4k ? 'status4k' : 'status'] ===
MediaStatus.PARTIALLY_AVAILABLE
) )
? MediaStatus.PARTIALLY_AVAILABLE ? MediaStatus.PARTIALLY_AVAILABLE
: media.seasons.some(
(season) =>
season[server4k ? 'status4k' : 'status'] ===
MediaStatus.PROCESSING
)
? MediaStatus.PROCESSING
: MediaStatus.UNKNOWN; : MediaStatus.UNKNOWN;
await mediaRepository.save(media); await mediaRepository.save(media);

Loading…
Cancel
Save