mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-20 21:55:03 -04:00
Download decision rejection reasons are no longer static messages
New: Better messaging on manual search when release is rejected
This commit is contained in:
@@ -19,17 +19,9 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public string RejectionReason
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Already in download queue.";
|
||||
}
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
|
||||
public bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
var queue = _downloadTrackingService.GetQueuedDownloads()
|
||||
.Where(v => v.State == TrackedDownloadState.Downloading)
|
||||
@@ -38,10 +30,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
if (IsInQueue(subject, queue))
|
||||
{
|
||||
_logger.Debug("Already in queue, rejecting.");
|
||||
return false;
|
||||
return Decision.Reject("Already in download queue");
|
||||
}
|
||||
|
||||
return true;
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
||||
private bool IsInQueue(RemoteEpisode newEpisode, IEnumerable<RemoteEpisode> queue)
|
||||
|
||||
Reference in New Issue
Block a user