Page 2 of 6

Re: Failed download handling issue from Sonarr

Posted: March 30th, 2016, 11:27 am
by shypike
SABnzbd only removes items from the temp download folder.
All jobs start in the temp folder, never in a category folder.
If you get the error, is the item gone?

Re: Failed download handling issue from Sonarr

Posted: March 30th, 2016, 12:39 pm
by kevindd992002
If that's the case, at what point does SABnzbd use the folder path set in the TV category?

I don't see any files/folders under the temp folder. This is expected as the download was "aborted" before even beginning so no files were downloaded. The problem is why was it not removed in SAB's history when Sonarr specifically requested it to be removed there?

Is the default logging level of Sab set to "errors/warning" only?

Re: Failed download handling issue from Sonarr

Posted: March 31st, 2016, 3:08 pm
by shypike
The default logging is Info.
The category folder is the final destination of a job.
While the job still consists of just RAR and par files, it uses the temp folder.
Unpacking goes from the temp folder to the category folder.
The latter is where Sonarr expects the end result.
It's likely that Sonarr is too quick when trying to delete a failed job.
Or SABnzbd contains some error in handling the delete request.

Re: Failed download handling issue from Sonarr

Posted: March 31st, 2016, 3:38 pm
by kevindd992002
But I've tried this twice and it eneded up in the same result. Sonarr being too quick to delete the failed job seems to be unlikely given the two failed tests, right? How would we know the error that SABnzbd has in handling the delete request?

So the info event below is just normal?

2016-03-30 08:08:28,153::INFO::[misc:1283] Cannot remove folder \?\D:\raw\Default\Scorpion.S02E21.1080p.HDTV.X264-DIMENSION-Obfuscate__ADMIN__

Re: Failed download handling issue from Sonarr

Posted: April 1st, 2016, 4:54 am
by shypike
We're already looking for a race-condition in SABnzbd code.
The same error may happen in other situations.
We just haven't found the root cause yet :(

Re: Failed download handling issue from Sonarr

Posted: April 1st, 2016, 8:17 pm
by kevindd992002
Ok.

You said that Sab only deletes file from the temp download folder. Is that why the "remove nzb and delete files" (in the old skin) button in the old skin is greyed out when a download has a category and it post process it to the category folder path afterwards? So in that case, that button is only clickable if a download fails and stays at the temp download folder?

What's the reasoning behind this? Why can't Sab delete files in the destination folder when you instruct it to delete it from the History? I mean it's not like it doesn't know where the files are. It has a record of wherever the files were extracted to.

Re: Failed download handling issue from Sonarr

Posted: April 2nd, 2016, 4:08 am
by shypike
SABnzbd never attempts to delete files and folders in the "complete" section.
That's because user scripts and software like Sonarr may have moved files around.
We don't want to mess with your media collection.

There are two kinds of jobs in the history queue.
Downloaded jobs that are waiting to be processed and jobs that are finished.

Re: Failed download handling issue from Sonarr

Posted: April 2nd, 2016, 5:03 am
by kevindd992002
Ok. But if Sonarr is the one requesting that the files should be deleted, Sab should be able to do so, right? A specific issue that we are troubleshooting in the Sonarr forum is when a sample release is downloaded I have to manually delete it in Sonarr's queue. Sonarr in turn will tell Sab to delete it from its History together with the files. What happens is that yes it gets deleted from Sab's history but the sample files remain because of this limit.

Is there anyway to set Sab to delete the files only if Sonarr requests it?

Re: Failed download handling issue from Sonarr

Posted: April 2nd, 2016, 6:08 am
by shypike
kevindd992002 wrote: Is there anyway to set Sab to delete the files only if Sonarr requests it?
The "delete" API call has a parameter that specifies whether files should be deleted or not.
However, it's likely that there is some kind of bug in SABnzbd that makes
the delete fail some times. We're looking into that.

Re: Failed download handling issue from Sonarr

Posted: April 2nd, 2016, 10:34 am
by kevindd992002
Yes, Sonarr does include that API call. So this is already existing then but just has a bug.

Re: Failed download handling issue from Sonarr

Posted: April 5th, 2016, 11:00 am
by kevindd992002
The delete issue fails ALL the time for me. I've recreated it several times already. Any clues on this?

Re: Failed download handling issue from Sonarr

Posted: April 8th, 2016, 1:14 pm
by kevindd992002
BUMP!

Re: Failed download handling issue from Sonarr

Posted: April 8th, 2016, 3:12 pm
by shypike
Give us time to find this.

Re: Failed download handling issue from Sonarr

Posted: April 8th, 2016, 3:15 pm
by kevindd992002
shypike wrote:Give us time to find this.
Yeah, no problem. I just wanted to make sure that you were able to read my last message.

Thanks!

Re: Failed download handling issue from Sonarr

Posted: April 8th, 2016, 4:09 pm
by shypike
We can reproduce it and are close to the solution.