Completed Download Handling of Repacks/Propers

I recently converted from using Drone Factory to using Completed Download Handling. Everything works great except for the processing of Repacks/Propers. NzbDrone is sending the repack download to nzbget but then nzbdrone never moves the repack after it’s downloaded. Nzbdrone moves the previous download to the designated recycle folder. The Drone factory path was removed and the timer was set to 0.

When using Drone Factory instead of Completed Download Handling repacks are handled correctly.

nzbdrone version 2.0.0.1690 master branch
nzbget version 13.0
running on Ubuntu 12.04.4
all on the same box

What does History -> Queue in drone show?

Please provide us with debug logs: https://github.com/NzbDrone/NzbDrone/wiki/Log-Files

I re-enabled Completed Download Handling and turned off Drone Factory. Next time it happens I’ll post the relevant portion of the log and what is shown in History -> Queue.

Thanks

OK it happened last night. There is nothing showing in History -> Queue. In History is shows as sent to the download client but nothing more about it after that.

Below is the relevant portion of the log, it contains the original download and the Repack 20 minutes later. The downloaded repack is still in the folder that nzbget puts it in after the download is unpacked. The original download was moved to the recycle folder by nzbdrone.
.
.

14-8-20 20:26:37.1|Info|Nzbget|Adding report [Legends.2014.S01E02.720p.HDTV.X264-DIMENSION.nzb] to the queue.
14-8-20 20:26:38.1|Info|Nzbget|Adding report [Legends.2014.S01E02.720p.HDTV.X264-DIMENSION.nzb] to the queue.
14-8-20 20:26:39.0|Info|DownloadService|Report sent to download client. Legends.2014.S01E02.720p.HDTV.X264-DIMENSION
14-8-20 20:26:39.5|Info|RssSyncService|RSS Sync Completed. Reports found: 298, Reports downloaded: 1
14-8-20 20:30:11.0|Info|HousekeepingService|Running housecleaning tasks
14-8-20 20:30:16.7|Info|Database|Vacuuming database
14-8-20 20:30:17.4|Info|Database|Database Compressed
14-8-20 20:30:17.9|Warn|EpisodeFileMovingService|Unable to set last write time

System.IO.IOException: Invalid parameter
at System.IO.File.SetLastWriteTime (System.String path, DateTime lastWriteTime) [0x00000] in :0
at System.IO.Directory.SetLastWriteTime (System.String path, DateTime lastWriteTime) [0x00000] in :0
at System.IO.Directory.SetLastWriteTimeUtc (System.String path, DateTime lastWriteTimeUtc) [0x00000] in :0
at NzbDrone.Common.Disk.DiskProviderBase.FolderSetLastWriteTimeUtc (System.String path, DateTime dateTime) [0x00000] in :0
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List`1 episodes, System.String destinationFilename, Boolean copyOnly) [0x00000] in :0

14-8-20 20:30:23.5|Info|CompletedDownloadService|[Legends.2014.S01E02.720p.HDTV.X264-DIMENSION] Imported 1 files.
14-8-20 20:36:56.3|Info|RssSyncService|Starting RSS Sync
14-8-20 20:36:56.8|Warn|HttpProvider|Failed to get response from: https://www.nzbsooti.sx/api?t=tvsearch&cat=5030,5040&extended=1&apikey= Error: ConnectFailure (Connection refused)
14-8-20 20:36:57.0|Warn|FetchFeedService|nzbSooti https://www.nzbsooti.sx/api?t=tvsearch&cat=5030,5040&extended=1&apikey= Error: ConnectFailure (Connection refused)
14-8-20 20:37:02.4|Info|DownloadDecisionMaker|Processing 198 reports
14-8-20 20:37:04.0|Info|RssSyncService|RSS Sync Completed. Reports found: 198, Reports downloaded: 0
14-8-20 20:44:37.3|Info|BackupService|Starting Backup
14-8-20 20:47:11.2|Info|RssSyncService|Starting RSS Sync
14-8-20 20:47:11.8|Warn|HttpProvider|Failed to get response from: https://www.nzbsooti.sx/api?t=tvsearch&cat=5030,5040&extended=1&apikey= Error: ConnectFailure (Connection refused)
14-8-20 20:47:11.9|Warn|FetchFeedService|nzbSooti https://www.nzbsooti.sx/api?t=tvsearch&cat=5030,5040&extended=1&apikey= Error: ConnectFailure (Connection refused)
14-8-20 20:47:17.2|Info|DownloadDecisionMaker|Processing 298 reports
14-8-20 20:47:19.2|Info|Nzbget|Adding report [Legends.2014.S01E02.REPACK.720p.HDTV.X264-DIMENSION.nzb] to the queue.
14-8-20 20:47:20.2|Info|Nzbget|Adding report [Legends.2014.S01E02.REPACK.720p.HDTV.X264-DIMENSION.nzb] to the queue.
14-8-20 20:47:21.1|Info|DownloadService|Report sent to download client. Legends.2014.S01E02.REPACK.720p.HDTV.X264-DIMENSION
14-8-20 20:47:21.5|Info|RssSyncService|RSS Sync Completed. Reports found: 298, Reports downloaded: 1
14-8-20 20:50:29.9|Fatal|NzbDroneErrorPipeline|Request Failed
14-8-20 20:50:53.5|Warn|ImportApprovedEpisodes|Couldn’t import episode /home/Media/downloads/dst/TV/Legends.2014.S01E02.REPACK.720p.HDTV.X264-DIMENSION/Legends.2014.S01E02.REPACK.720p.HDTV.X264-DIMENSION.mkv

System.IO.IOException: Invalid parameter
at System.IO.File.SetLastWriteTime (System.String path, DateTime lastWriteTime) [0x00000] in :0
at System.IO.File.SetLastWriteTimeUtc (System.String path, DateTime lastWriteTimeUtc) [0x00000] in :0
at NzbDrone.Common.Disk.DiskProviderBase.FileSetLastWriteTimeUtc (System.String path, DateTime dateTime) [0x00000] in :0
at NzbDrone.Core.MediaFiles.RecycleBinProvider.DeleteFile (System.String path) [0x00000] in :0
at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, Boolean copyOnly) [0x00000] in :0
at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1 decisions, Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem historyItem) [0x00000] in :0

14-8-20 20:50:53.6|Info|CompletedDownloadService|[Legends.2014.S01E02.REPACK.720p.HDTV.X264-DIMENSION] Imported 1 files.
14-8-20 20:57:26.3|Info|RssSyncService|Starting RSS Sync
14-8-20 20:57:26.9|Warn|HttpProvider|Failed to get response from: https://www.nzbsooti.sx/api?t=tvsearch&cat=5030,5040&extended=1&apikey= Error: ConnectFailure (Connection refused)
14-8-20 20:57:27.0|Warn|FetchFeedService|nzbSooti https://www.nzbsooti.sx/api?t=tvsearch&cat=5030,5040&extended=1&apikey= Error: ConnectFailure (Connection refused)
14-8-20 20:57:32.5|Info|DownloadDecisionMaker|Processing 298 reports
14-8-20 20:57:34.5|Info|RssSyncService|RSS Sync Completed. Reports found: 298, Reports downloaded: 0
14-8-20 21:07:38.4|Info|RssSyncService|Starting RSS Sync

Let me know if you need anything else.
thanks

Took a bit to figure it out, but it looks like after the file is “deleted” (moved to the drone recycle bin) the last write time is set, which fails on non-windows machines. So the next part of the import fails, which is moving the file, for some reason drone still thinks the file was successfully imported and doesn’t try again.

What does drone show as the status for the file? missing?

@Taloth this is an issue because the DownloadedEpisodeService gets zero imported back, but import approved episodes caught an error. Completed download service gets a list of results, with one or more approved ones and marks it as successfully imported. I made some changes that would help resolve the import failed but marked as successful error, its a WIP and doesn’t compile, but before I did too deep I wanted to get some feedback: https://github.com/NzbDrone/NzbDrone/commit/3de7aa31c49980c4b705fd3dfb1694375964d858

Episode missing from disk.