1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00

New: Index priority

#320
This commit is contained in:
Dtaggart
2020-09-10 18:04:53 -04:00
committed by GitHub
parent 9ed2b4e10b
commit b2737a3d35
13 changed files with 96 additions and 4 deletions
@@ -34,6 +34,7 @@ namespace NzbDrone.Core.DecisionEngine
CompareProtocol,
CompareEpisodeCount,
CompareEpisodeNumber,
CompareIndexerPriority,
ComparePeersIfTorrent,
CompareAgeIfUsenet,
CompareSize
@@ -62,6 +63,11 @@ namespace NzbDrone.Core.DecisionEngine
return comparers.Select(comparer => comparer).FirstOrDefault(result => result != 0);
}
private int CompareIndexerPriority(DownloadDecision x, DownloadDecision y)
{
return CompareByReverse(x.RemoteEpisode.Release, y.RemoteEpisode.Release, release => release.IndexerPriority);
}
private int CompareQuality(DownloadDecision x, DownloadDecision y)
{
if (_configService.DownloadPropersAndRepacks == ProperDownloadTypes.DoNotPrefer)