mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-05 23:57:20 +02:00
Fixed: Add dedupe releases rule based on indexer priority
This commit is contained in:
parent
9839b482b2
commit
938b69b240
@ -143,8 +143,10 @@ private List<DownloadDecision> Dispatch(Func<IIndexer, IEnumerable<ReleaseInfo>>
|
||||
|
||||
private List<DownloadDecision> DeDupeDecisions(List<DownloadDecision> decisions)
|
||||
{
|
||||
// De-dupe reports by guid so duplicate results aren't returned. Pick the one with the least rejections.
|
||||
return decisions.GroupBy(d => d.RemoteMovie.Release.Guid).Select(d => d.OrderBy(v => v.Rejections.Count()).First()).ToList();
|
||||
// De-dupe reports by guid so duplicate results aren't returned. Pick the one with the least rejections and higher indexer priority.
|
||||
return decisions.GroupBy(d => d.RemoteMovie.Release.Guid)
|
||||
.Select(d => d.OrderBy(v => v.Rejections.Count()).ThenBy(v => v.RemoteMovie?.Release?.IndexerPriority ?? 100).First())
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user