1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00

New: Implemented Torrent Download Clients: uTorrent, Transmission and Deluge. And several public and private Torrent Indexers.

This commit is contained in:
MythJuha
2014-05-13 19:57:46 +02:00
committed by Taloth Saldono
parent ffa814f387
commit 67cd5703a1
134 changed files with 11018 additions and 99 deletions
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Collections.Generic;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Qualities;
namespace NzbDrone.Core.DecisionEngine
@@ -19,7 +20,9 @@ namespace NzbDrone.Core.DecisionEngine
.GroupBy(c => c.RemoteEpisode.Series.Id, (i, s) => s
.OrderByDescending(c => c.RemoteEpisode.ParsedEpisodeInfo.Quality, new QualityModelComparer(s.First().RemoteEpisode.Series.Profile))
.ThenBy(c => c.RemoteEpisode.Episodes.Select(e => e.EpisodeNumber).MinOrDefault())
.ThenBy(c => c.RemoteEpisode.Release.DownloadProtocol)
.ThenBy(c => c.RemoteEpisode.Release.Size.Round(200.Megabytes()) / Math.Max(1, c.RemoteEpisode.Episodes.Count))
.ThenByDescending(c => TorrentInfo.GetSeeders(c.RemoteEpisode.Release))
.ThenBy(c => c.RemoteEpisode.Release.Age))
.SelectMany(c => c)
.Union(decisions.Where(c => c.RemoteEpisode.Series == null))