Fixed: Pushed releases not being properly rejected

This commit is contained in:
Mark McDowall 2023-09-18 20:58:47 -07:00
parent 11deefc51d
commit 07f816ffb1
1 changed files with 11 additions and 1 deletions

View File

@ -131,6 +131,11 @@ namespace NzbDrone.Core.Download
return ProcessedDecisionResult.Skipped;
}
if (!IsQualifiedReport(decision))
{
return ProcessedDecisionResult.Rejected;
}
if (decision.TemporarilyRejected)
{
_pendingReleaseService.Add(decision, PendingReleaseReason.Delay);
@ -149,9 +154,14 @@ namespace NzbDrone.Core.Download
}
internal List<DownloadDecision> GetQualifiedReports(IEnumerable<DownloadDecision> decisions)
{
return decisions.Where(IsQualifiedReport).ToList();
}
internal bool IsQualifiedReport(DownloadDecision decision)
{
// Process both approved and temporarily rejected
return decisions.Where(c => (c.Approved || c.TemporarilyRejected) && c.RemoteEpisode.Episodes.Any()).ToList();
return (decision.Approved || decision.TemporarilyRejected) && decision.RemoteEpisode.Episodes.Any();
}
private bool IsEpisodeProcessed(List<DownloadDecision> decisions, DownloadDecision report)