Fixed: Import episodes in ascending numerical order

Closes #772
pull/6/head
Mark McDowall 9 years ago
parent bf10d420ec
commit 28a70a0cf1

@ -52,7 +52,8 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
var importResults = new List<ImportResult>();
foreach (var importDecision in qualifiedImports.OrderByDescending(e => e.LocalEpisode.Size))
foreach (var importDecision in qualifiedImports.OrderByDescending(e => e.LocalEpisode.Episodes.Select(episode => episode.EpisodeNumber).MinOrDefault())
.ThenByDescending(e => e.LocalEpisode.Size))
{
var localEpisode = importDecision.LocalEpisode;
var oldFiles = new List<EpisodeFile>();

Loading…
Cancel
Save