Trying to figure out why my staging folder gets deleted


Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows): Mono JIT compiler version 4.6.2 (Debian
OS: debian stretch stable
Debug logs:
Description of issue:

my staging folder gets deleted, taking out other downloaded data that has not been post processed by sonarr along with it.

The workflow is:
File downloads in nzbget
nzbget post process
nzbget calls a script that rclone copies the file to a folder ~/media/tv/staging
sonarr finds the file and moves it to the correct tv folder and removes the download

i dont have anything in my post scripts that deletes the ~/media/tv/staging folder.

can anyone provide pointers to figure out where its deleting that staging folder? its one of two things that is making me want to go back to sickbeard (does it even work anymore?)

entry in the log

[Mythbusters.S03E22.SDTV.Chinese.Invasion.Alarm-Obfuscated] Error occurred while trying to delete data from ‘/home/username/media/tv/staging/’.: Directory /home/username/media/tv/staging/ is not empty

System.IO.IOException: Directory /home/username/media/tv/staging/ is not empty at System.IO.Directory.Delete (System.String path) [0x00084] in <8f2c484307284b51944a1a13a14c0266>:0 at System.IO.Directory.RecursiveDelete (System.String path) [0x0006f] in <8f2c484307284b51944a1a13a14c0266>:0 at System.IO.Directory.Delete (System.String path, System.Boolean recursive) [0x0000c] in <8f2c484307284b51944a1a13a14c0266>:0 at NzbDrone.Common.Disk.DiskProviderBase.DeleteFolder (System.String path, System.Boolean recursive) [0x00070] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskProviderBase.cs:244 at NzbDrone.Core.Download.DownloadClientBase`1[TSettings].DeleteItemData (System.String downloadId) [0x000b2] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Download\DownloadClientBase.cs:91

more logs


Sonarr expects there to be a folder for each completed download, the files should be in a job folder for each download.


i understand that it requires the downloaded item in its own folder


but its deleting the downloaded_item_S01E01 folder and the staging folder


By the looks of it, Sonarr’s being told the path to import from is the staging folder, not the job folder.

Which download client are you using?
We’re also going to need debug logs at a minimum, but enable trace logging and grab both.


Nzbget - i will check the post processing script and pull the logs.

closed #6

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.