Fix delay specification when delay is not set to zero

Fixes #410
This commit is contained in:
Leonardo Galli 2017-02-01 18:58:06 +01:00
commit 0bfa01f072
2 changed files with 4 additions and 4 deletions

View file

@ -76,7 +76,7 @@ namespace NzbDrone.Core.DecisionEngine
if (remoteEpisode.Movie == null) if (remoteEpisode.Movie == null)
{ {
//remoteEpisode.DownloadAllowed = true; //Fuck you :) //remoteEpisode.DownloadAllowed = true; //Fuck you :)
//decision = GetDecisionForReport(remoteEpisode, searchCriteria); decision = GetDecisionForReport(remoteEpisode, searchCriteria);
decision = new DownloadDecision(remoteEpisode, new Rejection("Unknown release. Movie not Found.")); decision = new DownloadDecision(remoteEpisode, new Rejection("Unknown release. Movie not Found."));
} }
else else

View file

@ -68,7 +68,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
// If quality meets or exceeds the best allowed quality in the profile accept it immediately // If quality meets or exceeds the best allowed quality in the profile accept it immediately
var bestQualityInProfile = new QualityModel(profile.LastAllowedQuality()); var bestQualityInProfile = new QualityModel(profile.LastAllowedQuality());
var isBestInProfile = comparer.Compare(subject.ParsedEpisodeInfo.Quality, bestQualityInProfile) >= 0; var isBestInProfile = comparer.Compare(subject.ParsedMovieInfo.Quality, bestQualityInProfile) >= 0;
if (isBestInProfile && isPreferredProtocol) if (isBestInProfile && isPreferredProtocol)
{ {
@ -82,13 +82,13 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
if (oldest != null && oldest.Release.AgeMinutes > delay) if (oldest != null && oldest.Release.AgeMinutes > delay)
{ {
return Decision.Accept(); return Decision.Accept();
} }*/
if (subject.Release.AgeMinutes < delay) if (subject.Release.AgeMinutes < delay)
{ {
_logger.Debug("Waiting for better quality release, There is a {0} minute delay on {1}", delay, subject.Release.DownloadProtocol); _logger.Debug("Waiting for better quality release, There is a {0} minute delay on {1}", delay, subject.Release.DownloadProtocol);
return Decision.Reject("Waiting for better quality release"); return Decision.Reject("Waiting for better quality release");
}*/ //TODO: Update for movies! } //TODO: Update for movies!
return Decision.Accept(); return Decision.Accept();
} }