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

New: Custom Format Language Condition

This commit is contained in:
Qstick
2022-08-14 14:07:26 -05:00
parent 52760e0908
commit 89b0b04e08
243 changed files with 1345 additions and 3956 deletions
@@ -29,7 +29,6 @@ namespace NzbDrone.Core.DecisionEngine
var comparers = new List<CompareDelegate>
{
CompareQuality,
CompareLanguage,
CompareCustomFormatScore,
CompareProtocol,
CompareEpisodeCount,
@@ -80,11 +79,6 @@ namespace NzbDrone.Core.DecisionEngine
CompareBy(x.RemoteEpisode, y.RemoteEpisode, remoteEpisode => remoteEpisode.ParsedEpisodeInfo.Quality.Revision));
}
private int CompareLanguage(DownloadDecision x, DownloadDecision y)
{
return CompareBy(x.RemoteEpisode, y.RemoteEpisode, remoteEpisode => remoteEpisode.Series.LanguageProfile.Value.Languages.FindIndex(l => l.Language == remoteEpisode.ParsedEpisodeInfo.Language));
}
private int CompareCustomFormatScore(DownloadDecision x, DownloadDecision y)
{
return CompareBy(x.RemoteEpisode, y.RemoteEpisode, remoteMovie => remoteMovie.CustomFormatScore);