Merge pull request #1240 from quorn23/master

(update) SABnzdb Scripts compatibility update for V4.0.0 and higher.
pull/1235/head^2
TRaSH 2 years ago committed by GitHub
commit 2586ae3109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,8 +21,12 @@ import sys
import re
try:
(scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname, season, episodenumber, episodename) = sys.argv
# Parse the 18 input variables for SABnzbd version >= 4.0.0
(scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname, season, episodenumber, episodename, is_proper, resolution, decade, year, month, day, job_type) = sys.argv
downloadsize = int(downloadsize)
except ValueError:
# ...or 11 variables for earlier versions
(scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname, season, episodenumber, episodename) = sys.argv
except:
sys.exit(1) # exit with 1 causes SABnzbd to ignore the output of this script

@ -20,7 +20,12 @@ import os
import os.path
try:
(scriptname, directory, orgnzbname, jobname, reportnumber, category, group, postprocstatus, url) = sys.argv
try:
# Parse the 18 input variables for SABnzbd version >= 4.0.0
(scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname, season, episodenumber, episodename, is_proper, resolution, decade, year, month, day, job_type) = sys.argv
except ValueError:
# ...or 11 variables for earlier versions
(scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname, season, episodenumber, episodename) = sys.argv
except:
print("No commandline parameters found")
sys.exit(1) # exit with 1 causes SABnzbd to ignore the output of this script

Loading…
Cancel
Save