|
|
@ -96,7 +96,7 @@ namespace NzbDrone.Core.Download.Pending
|
|
|
|
|
|
|
|
|
|
|
|
var albumIds = decision.RemoteAlbum.Albums.Select(e => e.Id);
|
|
|
|
var albumIds = decision.RemoteAlbum.Albums.Select(e => e.Id);
|
|
|
|
|
|
|
|
|
|
|
|
var existingReports = albumIds.SelectMany(v => alreadyPendingByAlbum[v] ?? Enumerable.Empty<PendingRelease>())
|
|
|
|
var existingReports = albumIds.SelectMany(v => alreadyPendingByAlbum[v])
|
|
|
|
.Distinct().ToList();
|
|
|
|
.Distinct().ToList();
|
|
|
|
|
|
|
|
|
|
|
|
var matchingReports = existingReports.Where(MatchingReleasePredicate(decision.RemoteAlbum.Release)).ToList();
|
|
|
|
var matchingReports = existingReports.Where(MatchingReleasePredicate(decision.RemoteAlbum.Release)).ToList();
|
|
|
@ -253,8 +253,7 @@ namespace NzbDrone.Core.Download.Pending
|
|
|
|
|
|
|
|
|
|
|
|
return artistReleases.Select(r => r.RemoteAlbum)
|
|
|
|
return artistReleases.Select(r => r.RemoteAlbum)
|
|
|
|
.Where(r => r.Albums.Select(e => e.Id).Intersect(albumIds).Any())
|
|
|
|
.Where(r => r.Albums.Select(e => e.Id).Intersect(albumIds).Any())
|
|
|
|
.OrderByDescending(p => p.Release.AgeHours)
|
|
|
|
.MaxBy(p => p.Release.AgeHours);
|
|
|
|
.FirstOrDefault();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<PendingRelease> GetPendingReleases()
|
|
|
|
private List<PendingRelease> GetPendingReleases()
|
|
|
|