fix(guide): SABnzbd Scripts - Updated Clean.py (#1777)

pull/1779/head
thezoggy 10 months ago committed by GitHub
parent 884252c28f
commit 2c3be4fa0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,13 +20,11 @@
import sys
import re
# normalize argv to scriptname and just first 8 arguments to maintain compatibility
sys.argv = sys.argv[:9]
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
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
# Parse the input variables for SABnzbd version >= 4.2.0
(scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist) = sys.argv
except:
sys.exit(1) # exit with 1 causes SABnzbd to ignore the output of this script

Loading…
Cancel
Save