|
|
@ -68,16 +68,10 @@ namespace NzbDrone.Core.DecisionEngine
|
|
|
|
private int CompareProtocol(DownloadDecision x, DownloadDecision y)
|
|
|
|
private int CompareProtocol(DownloadDecision x, DownloadDecision y)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var result = CompareBy(x.RemoteEpisode, y.RemoteEpisode, remoteEpisode =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Series.Tags);
|
|
|
|
|
|
|
|
var downloadProtocol = remoteEpisode.Release.DownloadProtocol;
|
|
|
|
|
|
|
|
return downloadProtocol == delayProfile.PreferredProtocol;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (x.IsForMovie)
|
|
|
|
if (x.IsForMovie)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result = CompareBy(x.RemoteMovie, y.RemoteMovie, remoteEpisode =>
|
|
|
|
return CompareBy(x.RemoteMovie, y.RemoteMovie, remoteEpisode =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Movie.Tags);
|
|
|
|
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Movie.Tags);
|
|
|
|
var downloadProtocol = remoteEpisode.Release.DownloadProtocol;
|
|
|
|
var downloadProtocol = remoteEpisode.Release.DownloadProtocol;
|
|
|
@ -85,6 +79,15 @@ namespace NzbDrone.Core.DecisionEngine
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var result = CompareBy(x.RemoteEpisode, y.RemoteEpisode, remoteEpisode =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Series.Tags);
|
|
|
|
|
|
|
|
var downloadProtocol = remoteEpisode.Release.DownloadProtocol;
|
|
|
|
|
|
|
|
return downloadProtocol == delayProfile.PreferredProtocol;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -125,8 +128,8 @@ namespace NzbDrone.Core.DecisionEngine
|
|
|
|
|
|
|
|
|
|
|
|
private int CompareAgeIfUsenet(DownloadDecision x, DownloadDecision y)
|
|
|
|
private int CompareAgeIfUsenet(DownloadDecision x, DownloadDecision y)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (x.RemoteEpisode.Release.DownloadProtocol != DownloadProtocol.Usenet ||
|
|
|
|
if (x.RemoteMovie.Release.DownloadProtocol != DownloadProtocol.Usenet ||
|
|
|
|
y.RemoteEpisode.Release.DownloadProtocol != DownloadProtocol.Usenet)
|
|
|
|
y.RemoteMovie.Release.DownloadProtocol != DownloadProtocol.Usenet)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|