Browse Source

Don’t send 8th parameter to user script when empty.

Modify sample script to show 8th parameter.
tags/0.7.17Beta3
shypike 12 years ago
parent
commit
0066b9f11e
  1. 1
      Sample-PostProc.cmd
  2. 1
      Sample-PostProc.sh
  3. 5
      sabnzbd/newsunpack.py

1
Sample-PostProc.cmd

@ -11,6 +11,7 @@ echo The fourth parameter (newzbin #) = %4
echo The fifth parameter (category) = %5
echo The sixth parameter (group) = %6
echo The seventh parameter (status) = %7
echo The eigth parameter (failure_url)= %8
echo.

1
Sample-PostProc.sh

@ -11,6 +11,7 @@ echo "The fourth parameter (newzbin-id) =" "$4"
echo "The fifth parameter (category) =" "$5"
echo "The sixth parameter (group) =" "$6"
echo "The seventh parameter (status) =" "$7"
echo "The eigth parameter (failure_url) =" "$8"
echo

5
sabnzbd/newsunpack.py

@ -133,7 +133,10 @@ def external_processing(extern_proc, complete_dir, filename, msgid, nicename, ca
""" Run a user postproc script, return console output and exit value
"""
command = [str(extern_proc), str(complete_dir), str(filename),
str(nicename), str(msgid), str(cat), str(group), str(status), str(failure_url)]
str(nicename), str(msgid), str(cat), str(group), str(status)]
if failure_url:
command.extend(str(failure_url))
if extern_proc.endswith('.py') and (sabnzbd.WIN32 or not os.access(extern_proc, os.X_OK)):
command.insert(0, 'python')

Loading…
Cancel
Save