From d48950ec3c243c54a30770d32fd39bf6b9b48bb8 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 22 May 2022 16:44:12 -0700 Subject: [PATCH] Fixed: Cutoff Unmet showing items above lowest accepted quality when upgrades are disabled --- src/NzbDrone.Core/Tv/EpisodeCutoffService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Tv/EpisodeCutoffService.cs b/src/NzbDrone.Core/Tv/EpisodeCutoffService.cs index 711082e70..2f2cee225 100644 --- a/src/NzbDrone.Core/Tv/EpisodeCutoffService.cs +++ b/src/NzbDrone.Core/Tv/EpisodeCutoffService.cs @@ -37,7 +37,8 @@ namespace NzbDrone.Core.Tv //Get all items less than the cutoff foreach (var profile in profiles) { - var cutoffIndex = profile.GetIndex(profile.Cutoff); + var cutoff = profile.UpgradeAllowed ? profile.Cutoff : profile.FirststAllowedQuality().Id; + var cutoffIndex = profile.GetIndex(cutoff); var belowCutoff = profile.Items.Take(cutoffIndex.Index).ToList(); if (belowCutoff.Any()) @@ -48,7 +49,8 @@ namespace NzbDrone.Core.Tv foreach (var profile in languageProfiles) { - var languageCutoffIndex = profile.Languages.FindIndex(v => v.Language == profile.Cutoff); + var languageCutoff = profile.UpgradeAllowed ? profile.Cutoff : profile.FirstAllowedLanguage(); + var languageCutoffIndex = profile.Languages.FindIndex(v => v.Language == languageCutoff); var belowLanguageCutoff = profile.Languages.Take(languageCutoffIndex).ToList(); if (belowLanguageCutoff.Any())