Fixed: Manual imports of multi-episode files being treated as fully imported
This commit is contained in:
parent
79d8a9d44b
commit
417340c2c6
|
@ -364,7 +364,12 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Manual
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (groupedTrackedDownload.Select(c => c.ImportResult).Count(c => c.Result == ImportResultType.Imported) >= Math.Max(1, trackedDownload.RemoteEpisode.Episodes.Count))
|
var allEpisodesImported = groupedTrackedDownload.Select(c => c.ImportResult)
|
||||||
|
.Where(c => c.Result == ImportResultType.Imported)
|
||||||
|
.SelectMany(c => c.ImportDecision.LocalEpisode.Episodes).Count() >=
|
||||||
|
Math.Max(1, trackedDownload.RemoteEpisode.Episodes.Count);
|
||||||
|
|
||||||
|
if (allEpisodesImported)
|
||||||
{
|
{
|
||||||
trackedDownload.State = TrackedDownloadState.Imported;
|
trackedDownload.State = TrackedDownloadState.Imported;
|
||||||
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload));
|
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload));
|
||||||
|
|
Loading…
Reference in New Issue