On download fail call post processing script

Want something added? Ask for it here.
Post Reply
Dannyboyni
Newbie
Newbie
Posts: 5
Joined: October 11th, 2012, 3:34 am

On download fail call post processing script

Post by Dannyboyni »

Hi

I am currently using sabtocouchpotato processing script.

https://couchpota.to/forum/showthread.php?tid=343

It works when a download fails and it queries CouchPotato Server for the next available release. Now this works most times but there are ocassions when it does not work.

One example of when the script was not called from within sabnzbd was when I received this error. "Download failed - Out of your server's retention?"

Is it possible to trigger the script on all download fail errors and not just some.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: On download fail call post processing script

Post by shypike »

It's not supposed to run the script when there are pp problems.
If you want that, disable "Safe postprocessing" in Config->Switches.
You'll have to handle any errors on your own.
Dannyboyni
Newbie
Newbie
Posts: 5
Joined: October 11th, 2012, 3:34 am

Re: On download fail call post processing script

Post by Dannyboyni »

I do not see the option to disable "Safe postprocessing". I am using sabnzbd on a unraid server.

How come the script runs when I have certain pp problems. For example I had a download fail on the error "Unpacking failed, CRC error", yet the post processing script was able to run. Because it ran it found the next available release and deleted the failed release. Exactly what I want.

So in conclusion, the post processing script sucessfully runs when ever there are any Unpacking errors. However the post processing script fails to run when there are download fails. Is it possible to make the script run on download fails?
Cpuroast
Release Testers
Release Testers
Posts: 69
Joined: December 15th, 2010, 11:19 pm

Re: On download fail call post processing script

Post by Cpuroast »

Dannyboyni wrote:I do not see the option to disable "Safe postprocessing". I am using sabnzbd on a unraid server.

How come the script runs when I have certain pp problems. For example I had a download fail on the error "Unpacking failed, CRC error", yet the post processing script was able to run. Because it ran it found the next available release and deleted the failed release. Exactly what I want.

So in conclusion, the post processing script sucessfully runs when ever there are any Unpacking errors. However the post processing script fails to run when there are download fails. Is it possible to make the script run on download fails?
Config, Switches, Post-Process Only Verified Jobs
Dannyboyni
Newbie
Newbie
Posts: 5
Joined: October 11th, 2012, 3:34 am

Re: On download fail call post processing script

Post by Dannyboyni »

I have already unchecked "Post-Process Only Verified Jobs"

As I have said when I get failed downloads because of CRC errors, or because of password protected rars my sabToCouchPotato script successfully runs. This is exactly what I want.

Its whenever I get a failed download because either the nzb has been taken down because of DMCA or because of the error "download failed - out of your server's retention?" that the script does not run.

I hope you guys understand my problem here.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: On download fail call post processing script

Post by shypike »

The "no files" situation is the only exception, because it technically doesn't fall in category "crc error" or "unpack error".
Dannyboyni
Newbie
Newbie
Posts: 5
Joined: October 11th, 2012, 3:34 am

Re: On download fail call post processing script

Post by Dannyboyni »

Would it be possible to allow my post processing script to run under the "no files" situation.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: On download fail call post processing script

Post by shypike »

It's always possible, but quite a bit of work to implement.
And you're probably one of the very few people wanting it.
I'll add it to the todo list, but without a timeframe, since there's no next release planned yet.
Dannyboyni
Newbie
Newbie
Posts: 5
Joined: October 11th, 2012, 3:34 am

Re: On download fail call post processing script

Post by Dannyboyni »

Thank you very much.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: On download fail call post processing script

Post by shypike »

A "special" option will be added to 0.7.5 that will cause the script to be run on an empty download.
Together with disabling "post process only verified jobs", this should solve your issue.
Note that the script will receive status -1 when there are no files.
clinton hall
Newbie
Newbie
Posts: 22
Joined: August 4th, 2012, 8:35 pm

Re: On download fail call post processing script

Post by clinton hall »

Thanks shypike.
This request originated from the use of my sabToCouchPotato script. This script basically calls the renamer via api when status == 0 and any other status will trigger the snatch of the next best release. So the proposed implementation in 0.7.5 will work beautifully.

As you have seen on a few posts, the api polling can be a bit problematic on small arm processors when downloading large files, so I believe the postprocessing out of SABnzbd to call these functions in CouchPotato (and SickBeard) are going to be the safest way for a lot of people.

If and when SickBeard implements failed download handling, hopefully they will adjust sabToSickBeard to handle this... Otherwise I might have another crack at it ;)
Post Reply