mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-10 23:29:53 +02:00
Fixed: Pushed releases not being properly rejected
This commit is contained in:
parent
11deefc51d
commit
07f816ffb1
@ -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);
|
||||
@ -149,9 +154,14 @@ public async Task<ProcessedDecisionResult> ProcessDecision(DownloadDecision deci
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user