Implement Release Parsing, Decision Engine, and Downloading (#35)

* Implement Parsing, Decision Engine, and Downloading
This commit is contained in:
Qstick
2017-08-13 22:58:42 -04:00
committed by GitHub
parent 5556989324
commit 1e4d9480e9
191 changed files with 2604 additions and 2755 deletions
@@ -20,13 +20,13 @@ namespace NzbDrone.Core.DecisionEngine
public List<DownloadDecision> PrioritizeDecisions(List<DownloadDecision> decisions)
{
return decisions.Where(c => c.RemoteEpisode.Series != null)
.GroupBy(c => c.RemoteEpisode.Series.Id, (seriesId, downloadDecisions) =>
return decisions.Where(c => c.RemoteAlbum.Artist != null)
.GroupBy(c => c.RemoteAlbum.Artist.Id, (artistId, downloadDecisions) =>
{
return downloadDecisions.OrderByDescending(decision => decision, new DownloadDecisionComparer(_delayProfileService));
})
.SelectMany(c => c)
.Union(decisions.Where(c => c.RemoteEpisode.Series == null))
.Union(decisions.Where(c => c.RemoteAlbum.Artist == null))
.ToList();
}
}