1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-03-05 13:21:25 -05:00

Additional logging for delay profile decisions

(cherry picked from commit fa0f77659cbd3e9efdae55bbedb30fd8288622a6)

Closes #10831
This commit is contained in:
Stevie Robinson
2025-01-11 02:06:05 +01:00
committed by Bogdan
parent 99f6be3f3d
commit f6b364725d

View File

@@ -47,11 +47,13 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
if (delay == 0)
{
_logger.Debug("Profile does not require a waiting period before download for {0}.", subject.Release.DownloadProtocol);
_logger.Debug("Delay Profile does not require a waiting period before download for {0}.", subject.Release.DownloadProtocol);
return Decision.Accept();
}
var comparer = new QualityModelComparer(profile);
_logger.Debug("Delay Profile requires a waiting period of {0} minutes for {1}", delay, subject.Release.DownloadProtocol);
var qualityComparer = new QualityModelComparer(profile);
var file = subject.Movie.MovieFile;
@@ -80,7 +82,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
if (delayProfile.BypassIfHighestQuality)
{
var bestQualityInProfile = profile.LastAllowedQuality();
var isBestInProfile = comparer.Compare(subject.ParsedMovieInfo.Quality.Quality, bestQualityInProfile) >= 0;
var isBestInProfile = qualityComparer.Compare(subject.ParsedMovieInfo.Quality.Quality, bestQualityInProfile) >= 0;
if (isBestInProfile && isPreferredProtocol)
{
@@ -106,6 +108,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
if (oldest != null && oldest.Release.AgeMinutes > delay)
{
_logger.Debug("Oldest pending release {0} has been delayed for {1}, longer than the set delay of {2}. Release will be accepted", oldest.Release.Title, oldest.Release.AgeMinutes, delay);
return Decision.Accept();
}