From 07f816ffb18ac34090c2f8ba25147737299b361d Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 18 Sep 2023 20:58:47 -0700 Subject: [PATCH] Fixed: Pushed releases not being properly rejected --- .../Download/ProcessDownloadDecisions.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs b/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs index 480a33bfa..640e67582 100644 --- a/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs +++ b/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs @@ -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 GetQualifiedReports(IEnumerable 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 decisions, DownloadDecision report)