mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Cleanup Episode References
This commit is contained in:
parent
a946d5886c
commit
3a7c4b2cfe
@ -98,10 +98,10 @@ private int CompareIndexerFlags(DownloadDecision x, DownloadDecision y)
|
||||
|
||||
private int CompareProtocol(DownloadDecision x, DownloadDecision y)
|
||||
{
|
||||
var result = CompareBy(x.RemoteMovie, y.RemoteMovie, remoteEpisode =>
|
||||
var result = CompareBy(x.RemoteMovie, y.RemoteMovie, remoteMovie =>
|
||||
{
|
||||
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Movie.Tags);
|
||||
var downloadProtocol = remoteEpisode.Release.DownloadProtocol;
|
||||
var delayProfile = _delayProfileService.BestForTags(remoteMovie.Movie.Tags);
|
||||
var downloadProtocol = remoteMovie.Release.DownloadProtocol;
|
||||
return downloadProtocol == delayProfile.PreferredProtocol;
|
||||
});
|
||||
|
||||
@ -119,15 +119,15 @@ private int ComparePeersIfTorrent(DownloadDecision x, DownloadDecision y)
|
||||
}
|
||||
|
||||
return CompareAll(
|
||||
CompareBy(x.RemoteMovie, y.RemoteMovie, remoteEpisode =>
|
||||
CompareBy(x.RemoteMovie, y.RemoteMovie, remoteMovie =>
|
||||
{
|
||||
var seeders = TorrentInfo.GetSeeders(remoteEpisode.Release);
|
||||
var seeders = TorrentInfo.GetSeeders(remoteMovie.Release);
|
||||
|
||||
return seeders.HasValue && seeders.Value > 0 ? Math.Round(Math.Log10(seeders.Value)) : 0;
|
||||
}),
|
||||
CompareBy(x.RemoteMovie, y.RemoteMovie, remoteEpisode =>
|
||||
CompareBy(x.RemoteMovie, y.RemoteMovie, remoteMovie =>
|
||||
{
|
||||
var peers = TorrentInfo.GetPeers(remoteEpisode.Release);
|
||||
var peers = TorrentInfo.GetPeers(remoteMovie.Release);
|
||||
|
||||
return peers.HasValue && peers.Value > 0 ? Math.Round(Math.Log10(peers.Value)) : 0;
|
||||
}));
|
||||
@ -141,10 +141,10 @@ private int CompareAgeIfUsenet(DownloadDecision x, DownloadDecision y)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return CompareBy(x.RemoteMovie, y.RemoteMovie, remoteEpisode =>
|
||||
return CompareBy(x.RemoteMovie, y.RemoteMovie, remoteMovie =>
|
||||
{
|
||||
var ageHours = remoteEpisode.Release.AgeHours;
|
||||
var age = remoteEpisode.Release.Age;
|
||||
var ageHours = remoteMovie.Release.AgeHours;
|
||||
var age = remoteMovie.Release.Age;
|
||||
|
||||
if (ageHours < 1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user