diff --git a/src/NzbDrone.Core/Extras/ImportExistingExtraFilesBase.cs b/src/NzbDrone.Core/Extras/ImportExistingExtraFilesBase.cs index c3ae44cba..fdfc7e67e 100644 --- a/src/NzbDrone.Core/Extras/ImportExistingExtraFilesBase.cs +++ b/src/NzbDrone.Core/Extras/ImportExistingExtraFilesBase.cs @@ -23,13 +23,17 @@ namespace NzbDrone.Core.Extras public virtual ImportExistingExtraFileFilterResult FilterAndClean(Series series, List filesOnDisk, List importedFiles, bool keepExistingEntries) { + var seriesFiles = _extraFileService.GetFilesBySeries(series.Id); + if (keepExistingEntries) { + var incompleteImports = seriesFiles.IntersectBy(f => Path.Combine(series.Path, f.RelativePath), filesOnDisk, i => i, PathEqualityComparer.Instance).Select(f => f.Id); + + _extraFileService.DeleteMany(incompleteImports); + return Filter(series, filesOnDisk, importedFiles, new List()); } - var seriesFiles = _extraFileService.GetFilesBySeries(series.Id); - Clean(series, filesOnDisk, importedFiles, seriesFiles); return Filter(series, filesOnDisk, importedFiles, seriesFiles);