Failed Download Handling and nzbToMedia

I had a problem come up between the script nzbToMedia and nzbdrone. I have posted about this issue on nzbToMedia’s issue page and Clinton Hall recommended I bring it up here too.

Here is the log from nzbtomedia:

and here are the relative nzbdrone logs:

14-9-30 09:00:36.4|Debug|Parser|Parsing string ‘Jimmy.Fallon.2014.09.29.Ben.Affleck.HDTV.x264-CROOKS’

14-9-30 09:00:36.4|Debug|Parser|Episode Parsed. jimmyfallon - [Unknown Episode]

14-9-30 09:00:36.4|Debug|Parser|Language parsed: English

14-9-30 09:00:36.4|Debug|NzbDrone.Core.Parser.QualityParser|Trying to
parse quality for Jimmy.Fallon.2014.09.29.Ben.Affleck.HDTV.x264-CROOKS

14-9-30 09:00:36.4|Debug|Parser|Quality parsed: SDTV v1

14-9-30 09:00:36.4|Debug|Parser|Release Group parsed: CROOKS

14-9-30 09:00:36.4|Debug|NzbDrone.Core.Parser.QualityParser|Trying to
parse quality for Jimmy.Fallon.2014.09.29.Ben.Affleck.HDTV.x264-CROOKS

14-9-30
09:00:36.4|Debug|DownloadedEpisodesImportService|Jimmy.Fallon.2014.09.29.Ben.Affleck.HDTV.x264-CROOKS
folder quality: SDTV v1

14-9-30 09:00:36.4|Debug|DiskScanService|Scanning
’D:\Downloads\sabnzbd\tv\Jimmy.Fallon.2014.09.29.Ben.Affleck.HDTV.x264-CROOKS’
for video files

14-9-30 09:00:36.4|Error|DownloadedEpisodesImportService|An error has
occurred while importing folder:
D:\Downloads\sabnzbd\tv\Jimmy.Fallon.2014.09.29.Ben.Affleck.HDTV.x264-CROOKS

System.IO.DirectoryNotFoundException: Could not find a part of the
path
’D:\Downloads\sabnzbd\tv\Jimmy.Fallon.2014.09.29.Ben.Affleck.HDTV.x264-CROOKS’.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

at System.IO.FileSystemEnumerableIterator1.CommonInit()
at System.IO.FileSystemEnumerableIterator1…ctor(String path,
String originalUserPath, String searchPattern, SearchOption
searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)

at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)

at NzbDrone.Common.Disk.DiskProviderBase.GetFiles(String path,
SearchOption searchOption) in
m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line
130

at NzbDrone.Core.MediaFiles.DiskScanService.GetVideoFiles(String
path, Boolean allDirectories) in
m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\DiskScanService.cs:line
109

at
NzbDrone.Core.MediaFiles.DownloadedEpisodesImportService.ProcessFolder(DirectoryInfo
directoryInfo) in
m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\DownloadedEpisodesImportService.cs:line
146

at
NzbDrone.Core.MediaFiles.DownloadedEpisodesImportService.ProcessFolder(String
path) in
m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\DownloadedEpisodesImportService.cs:line
194

Here is the link to the thread over at nzbToMedia, Clinton Hall has indicated that it would be good to coordinate a fix together for this: https://github.com/clinton-hall/nzbToMedia/issues/576

Thanks!

That’s awkward, nzbToMedia is telling drone to scan that folder as a completed download, then deletes it, because it deemed it as failed.

In that scenario nzbToMedia should trigger a failure in SAB or tell drone it failed, but since drone doesn’t have an endpoint to trigger a download as failed there isn’t much we can do at this time. Drone actually tells the download client to clean up any failed downloads, it doesn’t delete any files from disk on failure.

There are some opportunities for improvement here, we’ll just have to decide how we want to solve this.

Thanks Markus, I’ll pass your response on to Clinton Hall.