Whole season torrent bug

Hi.

I think i found a problem. When I ask sonarr to download an entire season using torrents and black hole, it sometimes finds one torrent with the whole season (sometimes one with the entire series).

But twice now, after a huge download, when sonarr moves the episodes to order them, it erraces most of them. in my case it did it with the whole collection of how I Met your mother, and with Rick and Morty. After downloading a whole lot, it just moved one episode and erase everything else.

Sonarr won’t delete the folder if there are still video files in there (non-samples) or if there is RARed content (prevent against deleting a RARed torrent before its imported).

Unless the runtime of all those video files was under the sample threshold (5 minutes for a 30 minute series) nothing would have been deleted.

Debug logs of the import process would be the first step for us to investigate any potential issue.

I think this is the relevant log. The trouble was with Rick.and.Morty.S01.720P.WEBRip.XviD-GUM

Hope this helps:
(also, maybe it’s important, drive T:\ is a mapped network drive, on a computer which is not allways on, so there might be some “can’t find target path” errors in there -but I don’t think they are related, as when this season downloaded, the computer with T:\ was on- ).

System.IO.IOException: The file exists.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.__Error.WinIOError()
   at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
   at NzbDrone.Common.Disk.DiskProviderBase.TransferFile(String source, String destination, TransferMode mode, Boolean overwrite) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 285
   at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List`1 episodes, String destinationFilename, TransferMode mode) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 125
   at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 66
   at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 64
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 89

15-3-26 23:38:13.7|Warn|DownloadedEpisodesImportService|Non-sample file detected: [C:\_Media\_AutoDownloads\_TVDone\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS[rarbg]\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS.mkv]
15-3-26 23:38:18.9|Error|DownloadEventHub|Couldn't remove item from client Rick.and.Morty.S01.720P.WEBRip.XviD-GUM

System.IO.IOException: The directory is not empty.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
   at NzbDrone.Common.Disk.DiskProviderBase.DeleteFolder(String path, Boolean recursive) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 301
   at NzbDrone.Core.Download.Clients.TorrentBlackhole.TorrentBlackhole.RemoveItem(String downloadId, Boolean deleteData) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Download\Clients\TorrentBlackhole\TorrentBlackhole.cs:line 144
   at NzbDrone.Core.Download.DownloadEventHub.RemoveFromDownloadClient(TrackedDownload trackedDownload) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Download\DownloadEventHub.cs:line 64

15-3-26 23:38:30.2|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E11.Ricksy.Business.WEBRip.XviD-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E11.Ricksy.Business.WEBRip.XviD-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:30.2|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E06.Rick.Potion.9.WEBRip.XviD-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E06.Rick.Potion.9.WEBRip.XviD-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:30.2|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E10.Close.Rick-counters.of.the.Rick.Kind.WEBRip.XviD-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E10.Close.Rick-counters.of.the.Rick.Kind.WEBRip.XviD-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:30.2|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E07.Raising.Gazorpazorp.WEBRip.XviD-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E07.Raising.Gazorpazorp.WEBRip.XviD-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:30.2|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E04.M.Night.Shaym-Aliens.WEBRip.XviD-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E04.M.Night.Shaym-Aliens.WEBRip.XviD-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:30.2|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E01.Pilot.WEBRip.XviD-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E01.Pilot.WEBRip.XviD-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:30.2|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E02.Lawnmower.Dog.WEBRip-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E02.Lawnmower.Dog.WEBRip-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:30.3|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E03.Anatomy.Park.WEBRip.XviD-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E03.Anatomy.Park.WEBRip.XviD-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:30.3|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E05.Meeseeks.and.Destroy.WEBRip.XviD-GUM.avi

System.IO.FileNotFoundException: File doesn't exist: C:\_Media\_AutoDownloads\_TVDone\Rick.and.Morty.S01.720P.WEBRip.XviD-GUM\Rick.and.Morty.S01E05.Meeseeks.and.Destroy.WEBRip.XviD-GUM.avi
   at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 158
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 76

15-3-26 23:38:35.3|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS[rarbg]\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS.mkv

System.IO.IOException: The file exists.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.__Error.WinIOError()
   at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
   at NzbDrone.Common.Disk.DiskProviderBase.TransferFile(String source, String destination, TransferMode mode, Boolean overwrite) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 285
   at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List`1 episodes, String destinationFilename, TransferMode mode) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 125
   at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 66
   at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 64
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 89

15-3-26 23:38:35.4|Warn|DownloadedEpisodesImportService|Non-sample file detected: [C:\_Media\_AutoDownloads\_TVDone\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS[rarbg]\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS.mkv]
15-3-26 23:39:32.1|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS[rarbg]\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS.mkv

System.IO.IOException: The file exists.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.__Error.WinIOError()
   at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
   at NzbDrone.Common.Disk.DiskProviderBase.TransferFile(String source, String destination, TransferMode mode, Boolean overwrite) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 285
   at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List`1 episodes, String destinationFilename, TransferMode mode) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 125
   at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 66
   at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 64
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 89

15-3-26 23:39:32.2|Warn|DownloadedEpisodesImportService|Non-sample file detected: [C:\_Media\_AutoDownloads\_TVDone\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS[rarbg]\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS.mkv]
15-3-26 23:40:34.1|Warn|ImportApprovedEpisodes|Couldn't import episode C:\_Media\_AutoDownloads\_TVDone\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS[rarbg]\12.Monkeys.S01E01.Splinter.720p.WEB-DL.DD5.1.H.264-BS.mkv