1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

New: Add bypass if above Custom Format Score to Delay Profile

Closes #5043
This commit is contained in:
Mark McDowall
2023-01-13 17:40:49 -08:00
committed by GitHub
parent bc2942c28d
commit 4ed4ca4804
6 changed files with 127 additions and 18 deletions
@@ -76,6 +76,19 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
}
}
// If quality meets or exceeds the best allowed quality in the profile accept it immediately
if (delayProfile.BypassIfAboveCustomFormatScore)
{
var score = subject.CustomFormatScore;
var minimum = delayProfile.MinimumCustomFormatScore;
if (score >= minimum && isPreferredProtocol)
{
_logger.Debug("Custom format score ({0}) meets minimum ({1}) for preferred protocol, will not delay", score, minimum);
return Decision.Accept();
}
}
var episodeIds = subject.Episodes.Select(e => e.Id);
var oldest = _pendingReleaseService.OldestPendingRelease(subject.Series.Id, episodeIds.ToArray());