1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-26 22:56:23 -04:00

New: Minimum Upgrade Score for Custom Formats

Closes #6800
This commit is contained in:
somniumV
2024-09-15 19:20:03 +02:00
committed by GitHub
parent 24f03fc1e9
commit 8b20a9449c
14 changed files with 164 additions and 11 deletions
@@ -95,6 +95,17 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
return UpgradeableRejectReason.CustomFormatCutoff;
}
if (newFormatScore < currentFormatScore + qualityProfile.MinUpgradeFormatScore)
{
_logger.Debug("New item's custom formats [{0}] ({1}) do not meet minimum custom format score increment of {3} required for upgrade, skipping. Existing: [{4}] ({5}).",
newCustomFormats.ConcatToString(),
newFormatScore,
qualityProfile.MinUpgradeFormatScore,
currentCustomFormats.ConcatToString(),
currentFormatScore);
return UpgradeableRejectReason.MinCustomFormatScore;
}
_logger.Debug("New item's custom formats [{0}] ({1}) improve on [{2}] ({3}), accepting",
newCustomFormats.ConcatToString(),
newFormatScore,
@@ -77,6 +77,9 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
case UpgradeableRejectReason.CustomFormatScore:
return Decision.Reject("Existing file on disk has a equal or higher custom format score: {0}", qualityProfile.CalculateCustomFormatScore(customFormats));
case UpgradeableRejectReason.MinCustomFormatScore:
return Decision.Reject("Existing file differential between new release does not meet minimum Custom Format score increment: {0}", qualityProfile.MinFormatScore);
}
}