Using sabToSickBeard with NZBGet

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
kjKmcQN3
Posts: 75
Joined: 29 Aug 2015, 15:09

Re: Using sabToSickBeard with NZBGet

Post by kjKmcQN3 » 30 Oct 2015, 07:06

Hello clinton. I've finally decided to switch to nzbToMedia. Have a few questions that I have have mentioned in this post. Thanks for your help as always.

Update: I think my post got moved here

Blindfold
Posts: 3
Joined: 28 Nov 2015, 19:03

Re: Using sabToSickBeard with NZBGet

Post by Blindfold » 28 Nov 2015, 19:28

clintonhall wrote:2 options...

for option 1, your settings can be imported... however you would still need to add the correct host, port, user, pass etc in the config of nzbToMedia shown in NZBGet web UI (so actually, the migration would be rather pointless). I forgot that I did the migration BEFORE allowing the settings to be specified in NZBGet WebUI...

So, option 2 is probably what you want. Just edit the sabToSickBeard.py as per mys post, then when you point NZBGet to this scripts folder, you should see the sabToScikBeard.py script.
The settings should be as per your existing autoProcessTV.cfg

Give it a go and let me know if you have any issues (I never had a chance to test it)
Hi Clinton / someone else who might have a suggestion

I've had issues with nzbtomedia because I'm still on Python 2.6 and getting errors, but I found the script you pasted in this thread that could replace the sabtosickbeard script I was using before moving to nzbget from SABnzb.

After using the script the first time I got this error:

Post-process-script Sick.py for download name (terminated with unknown status)
INFO Sat Nov 28 2015 19:55:10 Sick: TypeError: processEpisode() takes at most 2 arguments (3 given)
INFO Sat Nov 28 2015 19:55:10 Sick: autoProcessTV.processEpisode(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBNAME'], status)
INFO Sat Nov 28 2015 19:55:10 Sick: File "/c/nzbget/nzbget/scripts/Sick.py", line 87, in <module>
INFO Sat Nov 28 2015 19:55:10 Sick: Traceback (most recent call last):
INFO Sat Nov 28 2015 19:55:10 Sick: Script triggered from NZBGet, starting autoProcessTV...
INFO Sat Nov 28 2015 19:55:10 Sick: MAIN: Script triggered from NZBGet (11.0 or later).

with my simple deduction skills I resolved this issue by removing the last argument found in the error: status part of the line so I changed it to: autoProcessTV.processEpisode(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBNAME']).

Now the script is running great and downloads are correctly being transferred from NZBget to Sickbeard and the original directory is removed, so I'm mostly very happy with the result.

Unfortunately with my limited understanding what I'm doing I might have broken something in the script, because apparently it's not closing with a correct exit code and although everything worked fine, it gets flagged as PP-Failure and the log shows:

ERROR Sat Nov 28 2015 20:20:52 Post-process-script Sick.py for download name failed (terminated with unknown status)
INFO Sat Nov 28 2015 20:20:52 Sick: Processing succeeded for download name

So it's not a very big deal, but now that I've come so far, it would be great if the final status in NZBGet is also green. Does someone have a suggestion?

thanks for any suggestion (and mostly for already creating this script)

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Using sabToSickBeard with NZBGet

Post by hugbug » 28 Nov 2015, 19:49

NZBGet expect a correct exit code from the script. Please see https://github.com/nzbget/nzbget/wiki/P ... exit-codes

Blindfold
Posts: 3
Joined: 28 Nov 2015, 19:03

Re: Using sabToSickBeard with NZBGet

Post by Blindfold » 28 Nov 2015, 21:59

hugbug wrote:NZBGet expect a correct exit code from the script. Please see https://github.com/nzbget/nzbget/wiki/P ... exit-codes
Thanks. I got to the same conclusion, but unfortunately my scripting skills are not good enough that I know where to put it in the script clintonhall posted on the first page.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Using sabToSickBeard with NZBGet

Post by hugbug » 28 Nov 2015, 22:03

Try adding as a new line at the very end:

Code: Select all

sys.exit(93)

Blindfold
Posts: 3
Joined: 28 Nov 2015, 19:03

Re: Using sabToSickBeard with NZBGet

Post by Blindfold » 28 Nov 2015, 23:10

hugbug wrote:Try adding as a new line at the very end:

Code: Select all

sys.exit(93)
Haha. Well. that was simpler than what I had tried. I had put it on several locations, but apparently I didn't try the most obvious place.

thanks for your quick assistance!

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests