|
|
@ -21,8 +21,12 @@ import sys
|
|
|
|
import re
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
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)
|
|
|
|
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:
|
|
|
|
except:
|
|
|
|
sys.exit(1) # exit with 1 causes SABnzbd to ignore the output of this script
|
|
|
|
sys.exit(1) # exit with 1 causes SABnzbd to ignore the output of this script
|
|
|
|
|
|
|
|
|
|
|
@ -64,4 +68,4 @@ print()
|
|
|
|
print()
|
|
|
|
print()
|
|
|
|
print()
|
|
|
|
print()
|
|
|
|
# 0 means OK
|
|
|
|
# 0 means OK
|
|
|
|
sys.exit(0)
|
|
|
|
sys.exit(0)
|
|
|
|