From 4340b6b922c70123d4a4502a8dd222c05de28aa0 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 14 Mar 2021 23:38:15 -0400 Subject: [PATCH] Add a few more cutoff spec logs --- .../Specifications/CutoffSpecification.cs | 2 ++ .../Specifications/UpgradableSpecification.cs | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs index 8f6ff73dc..0c755ee10 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs @@ -32,6 +32,8 @@ namespace NzbDrone.Core.DecisionEngine.Specifications if (file != null) { file.Movie = subject.Movie; + _logger.Debug("Comparing file quality with report. Existing file is {0}", file.Quality); + var customFormats = _formatService.ParseCustomFormat(file); if (!_upgradableSpecification.CutoffNotMet(profile, diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradableSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradableSpecification.cs index 64ccae70a..8d3286479 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradableSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradableSpecification.cs @@ -93,7 +93,19 @@ namespace NzbDrone.Core.DecisionEngine.Specifications public bool CutoffNotMet(Profile profile, QualityModel currentQuality, List currentFormats, QualityModel newQuality = null) { - return QualityCutoffNotMet(profile, currentQuality, newQuality) || CustomFormatCutoffNotMet(profile, currentFormats); + if (QualityCutoffNotMet(profile, currentQuality, newQuality)) + { + return true; + } + + if (CustomFormatCutoffNotMet(profile, currentFormats)) + { + return true; + } + + _logger.Debug("Existing item meets cut-off. skipping."); + + return false; } public bool IsRevisionUpgrade(QualityModel currentQuality, QualityModel newQuality)