mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-15 10:39:47 +02:00
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 @@ public void Execute(ManualImportCommand message)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload));
|
||||
|
Loading…
Reference in New Issue
Block a user