Page 1 of 1

[API] mode=retry

Posted: November 20th, 2014, 6:10 pm
by markus101
In Sonarr (formally NzbDrone) we're using

Code: Select all

mode=retry&value=nzb_id
where nzo_id is the ID we get from SAB when we POST the nzb to it.

We do this in the case a download fails and its been less than 1 hour (by default), which lets Sonarr retry the download in SAB to see if it will complete, in an attempt to overcome propagation issues. Over the past coupel days I've been working with a user to troubleshoot an issue where the download would fail in SAB and upon retrying it automatically from Sonarr it would continue to fail, but if the user grabbed the exact same nzb (as confirmed by comparing the archived NZB and the same NZB from the same indexer) via manual intervention (either by grabbing it directly from the indexer, or selecting that nzb from within Sonarr it would complete successfully.

Am I correct in the understanding that a retry doesn't send the nzb back to the download queue, but only retries post processing? Is there an option to force it to retry grabbing any articles that failed previously, instead of assuming they're still unavailable?

Thanks in advance.

Re: [API] mode=retry

Posted: November 21st, 2014, 3:05 am
by shypike
markus101 wrote: Am I correct in the understanding that a retry doesn't send the nzb back to the download queue, but only retries post processing? Is there an option to force it to retry grabbing any articles that failed previously, instead of assuming they're still unavailable?
It depends.
When complete files are missing, they will be downloaded (if possible).
What SABnzbd doesn't do and cannot do is to fill in missing parts of files.
Incomplete files stay incomplete.
The main problem is that the NZB doesn't say what the actual data size is.
it contains only the size of the raw data and there is no 100% predictable relation with the actual size.
Perhaps SABnzbd could do a bit more, but the method would be very complicated.

Re: [API] mode=retry

Posted: November 21st, 2014, 6:52 pm
by markus101
Thanks for the explanation. It makes perfect sense that you can't tell if a file is incomplete given the information you do know.

Sounds like our retry mechanism will work if the release fails early due to propagation issues, but if its mostly there we're not going to have any luck getting a complete download with a retry. Is there a switch or another endpoint that we can use to force a full redownload?

Just saw that 0.7.20 came out with the ID being returned on retry, thanks for that as well.

Re: [API] mode=retry

Posted: November 22nd, 2014, 2:10 am
by shypike
The only "force" method now would be to remove incomplete files before retrying.
I'll think about what I can do in SABnzbd.
But that would be for release 0.8.0
It's time to stop the 0.7.x series.

Re: [API] mode=retry

Posted: November 22nd, 2014, 3:02 am
by markus101
Thanks again shypike, we're going to discuss how we want to handle this within Sonarr as well. Thanks for your time, its much appreciated.