Did the post processing API change?

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
gitar
Newbie
Newbie
Posts: 5
Joined: March 10th, 2010, 3:09 am

Did the post processing API change?

Post by gitar »

Hi there!

It seems to me that the post processing API changed somehow. When I try to get parameters with sys.argv in a python post-processing-script the sys.argv list comes back with only sys.argv[0] which won't help me much.

I did look up the user-script-wiki at wiki.sabnzbd.org/user-scripts and tried calling my python script with a cmd file like so:

Code: Select all

C:\Python32\python.exe C:\Users\gitar\AppData\Local\sabnzbd\scripts\working\mysab.py %1 %2 %3
^^ This worked. (I only really need %1 and %3 for my script)


I do remember though that I could still get sys.argv directly in sabnzbd++ versions pre 0.6., so I am not very sure what changed.


Cheers and thanks for the hard but great work you all do.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Did the post processing API change?

Post by shypike »

There were some minor changes in the implementation,
but that should have no effect on the parameters,
other than adding quotes were they are needed.
What happens if you call the Python script directly, so without the wrapper?
gitar
Newbie
Newbie
Posts: 5
Joined: March 10th, 2010, 3:09 am

Re: Did the post processing API change?

Post by gitar »

I tried the following test_sab.py file directly:

Code: Select all

import sys

print(sys.argv)

I got following sys.argv list:

Code: Select all

['C:\\Users\\gitar\\AppData\\Local\\sabnzbd\\scripts\\working\\test_sab.py']

So all I get is the script name, and no other parameters.
I'll do some more snooping around when I have time. Don't worry too much about this, it works fine with the wrapper.
Post Reply