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

Closes #1688
This commit is contained in:
Qstick
2023-01-30 22:02:53 -06:00
parent dbb6ef7664
commit de46816cdb

View File

@@ -31,7 +31,8 @@ namespace NzbDrone.Core.Books
//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.FirstAllowedQuality().Id;
var cutoffIndex = profile.GetIndex(cutoff);
var belowCutoff = profile.Items.Take(cutoffIndex.Index).ToList();
if (belowCutoff.Any())