mirror of
https://github.com/Readarr/Readarr
synced 2025-12-30 04:06:53 +01:00
Fixed: Pushed releases not being properly rejected
(cherry picked from commit 07f816ffb18ac34090c2f8ba25147737299b361d) Closes #2943
This commit is contained in:
parent
03392ca635
commit
3b3ebe463c
1 changed files with 12 additions and 2 deletions
|
|
@ -131,6 +131,11 @@ public async Task<ProcessedDecisionResult> ProcessDecision(DownloadDecision deci
|
|||
return ProcessedDecisionResult.Skipped;
|
||||
}
|
||||
|
||||
if (!IsQualifiedReport(decision))
|
||||
{
|
||||
return ProcessedDecisionResult.Rejected;
|
||||
}
|
||||
|
||||
if (decision.TemporarilyRejected)
|
||||
{
|
||||
_pendingReleaseService.Add(decision, PendingReleaseReason.Delay);
|
||||
|
|
@ -150,8 +155,13 @@ public async Task<ProcessedDecisionResult> ProcessDecision(DownloadDecision deci
|
|||
|
||||
internal List<DownloadDecision> GetQualifiedReports(IEnumerable<DownloadDecision> decisions)
|
||||
{
|
||||
//Process both approved and temporarily rejected
|
||||
return decisions.Where(c => (c.Approved || c.TemporarilyRejected) && c.RemoteBook.Books.Any()).ToList();
|
||||
return decisions.Where(IsQualifiedReport).ToList();
|
||||
}
|
||||
|
||||
internal bool IsQualifiedReport(DownloadDecision decision)
|
||||
{
|
||||
// Process both approved and temporarily rejected
|
||||
return (decision.Approved || decision.TemporarilyRejected) && decision.RemoteBook.Books.Any();
|
||||
}
|
||||
|
||||
private bool IsBookProcessed(List<DownloadDecision> decisions, DownloadDecision report)
|
||||
|
|
|
|||
Loading…
Reference in a new issue