mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
more nzbget changes
This commit is contained in:
parent
108fea700b
commit
d3b495e4d8
3 changed files with 74 additions and 85 deletions
|
@ -415,6 +415,11 @@ def main(args, section=None):
|
|||
|
||||
# NZBGet
|
||||
if os.environ.has_key('NZBOP_SCRIPTDIR'):
|
||||
# Check if the script is called from nzbget 11.0 or later
|
||||
if os.environ['NZBOP_VERSION'][0:5] < '11.0':
|
||||
logger.error("NZBGet Version %s is not supported. Please update NZBGet." %(str(os.environ['NZBOP_VERSION'][0:5])))
|
||||
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_ERROR)
|
||||
|
||||
logger.info("Script triggered from NZBGet Version %s." %(str(os.environ['NZBOP_VERSION'][0:5])))
|
||||
|
||||
# Check if the script is called from nzbget 13.0 or later
|
||||
|
@ -423,12 +428,8 @@ def main(args, section=None):
|
|||
logger.info("Download failed with status %s." %(os.environ['NZBPP_STATUS']))
|
||||
status = 1
|
||||
|
||||
# Check if the script is called from nzbget 11.0 or later
|
||||
elif os.environ['NZBOP_VERSION'][0:5] < '11.0':
|
||||
logger.error("NZBGet Version %s is not supported. Please update NZBGet." %(str(os.environ['NZBOP_VERSION'][0:5])))
|
||||
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_ERROR)
|
||||
|
||||
else:
|
||||
# Check par status
|
||||
if os.environ['NZBPP_PARSTATUS'] == '1' or os.environ['NZBPP_PARSTATUS'] == '4':
|
||||
logger.warning("Par-repair failed, setting status \"failed\"")
|
||||
status = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue