1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-03-05 13:20:20 -05:00

Fixed: Cutoff Unmet showing items above lowest accepted quality when upgrades are disabled

This commit is contained in:
Mark McDowall
2022-05-22 16:44:12 -07:00
parent 6a7d84f134
commit d48950ec3c

View File

@@ -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())