mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Fixed nzbToMedia scripts that where not passing a category to the processing scripts
This commit is contained in:
parent
3433cc56aa
commit
5e5f00de0c
4 changed files with 24 additions and 18 deletions
|
@ -198,10 +198,9 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5
|
|||
|
||||
# All checks done, now launching the script.
|
||||
download_id = ""
|
||||
if os.environ.has_key('NZBPR_COUCHPOTATO'):
|
||||
download_id = os.environ['NZBPR_COUCHPOTATO']
|
||||
if os.environ.has_key('NZBPR_COUCHPOTATO'): download_id = os.environ['NZBPR_COUCHPOTATO']
|
||||
Logger.info("MAIN: Script triggered from NZBGet, starting autoProcessMovie...")
|
||||
result = autoProcessMovie().process(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBNAME'], status, clientAgent, download_id)
|
||||
result = autoProcessMovie().process(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBFILENAME'], clientAgent="nzbget", inputCategory=os.environ['NZBPP_CATEGORY'])
|
||||
# SABnzbd Pre 0.7.17
|
||||
elif len(sys.argv) == config.SABNZB_NO_OF_ARGUMENTS:
|
||||
# SABnzbd argv:
|
||||
|
@ -213,8 +212,7 @@ elif len(sys.argv) == config.SABNZB_NO_OF_ARGUMENTS:
|
|||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
Logger.info("MAIN: Script triggered from SABnzbd, starting autoProcessMovie...")
|
||||
clientAgent = "sabnzbd"
|
||||
result = autoProcessMovie().process(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent)
|
||||
result = autoProcessMovie().process(sys.argv[1], sys.argv[2], status=sys.argv[7], inputCategory=sys.argv[5], clientAgent = "sabnzbd", download_id='')
|
||||
# SABnzbd 0.7.17+
|
||||
elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
||||
# SABnzbd argv:
|
||||
|
@ -227,8 +225,7 @@ elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
|||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
# 8 Failure URL
|
||||
Logger.info("MAIN: Script triggered from SABnzbd 0.7.17+, starting autoProcessMovie...")
|
||||
clientAgent = "sabnzbd"
|
||||
result = autoProcessMovie().process(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent)
|
||||
result = autoProcessMovie().process(sys.argv[1], sys.argv[2], status=sys.argv[7], inputCategory=sys.argv[5], clientAgent = "sabnzbd", download_id='')
|
||||
else:
|
||||
result = 0
|
||||
|
||||
|
@ -241,11 +238,11 @@ else:
|
|||
if config().isenabled(section, category):
|
||||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
Logger.info("MAIN: nzbToCouchPotato running %s:%s as a manual run...", section, subsection)
|
||||
Logger.info("MAIN: nzbToCouchPotato running %s:%s as a manual run...", section, category)
|
||||
results = autoProcessMovie().process(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
if results != 0:
|
||||
result = results
|
||||
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, subsection)
|
||||
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, category)
|
||||
else:
|
||||
Logger.info("MAIN: nzbTo%s %s:%s is DISABLED, you can enable this in autoProcessMedia.cfg ...", section, section, category)
|
||||
|
||||
|
|
|
@ -133,7 +133,8 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5
|
|||
|
||||
# All checks done, now launching the script.
|
||||
Logger.info("MAIN: Script triggered from NZBGet, starting autoProcessGames...")
|
||||
result = autoProcessGames().process(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBNAME'], status)
|
||||
clientAgent = "nzbget"
|
||||
result = autoProcessGames().process(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBFILENAME'], status, clientAgent, os.environ['NZBPP_CATEGORY'])
|
||||
# SABnzbd Pre 0.7.17
|
||||
elif len(sys.argv) == config.SABNZB_NO_OF_ARGUMENTS:
|
||||
# SABnzbd argv:
|
||||
|
@ -145,7 +146,8 @@ elif len(sys.argv) == config.SABNZB_NO_OF_ARGUMENTS:
|
|||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
Logger.info("MAIN: Script triggered from SABnzbd, starting autoProcessGames...")
|
||||
result = autoProcessGames().process(sys.argv[1], sys.argv[3], sys.argv[7])
|
||||
clientAgent = "sabnzbd"
|
||||
result = autoProcessGames().process(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
|
||||
# SABnzbd 0.7.17+
|
||||
elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
||||
# SABnzbd argv:
|
||||
|
@ -158,7 +160,8 @@ elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
|||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
# 8 Failure URL
|
||||
Logger.info("MAIN: Script triggered from SABnzbd 0.7.17+, starting autoProcessGames...")
|
||||
result = autoProcessGames().process(sys.argv[1], sys.argv[3], sys.argv[7])
|
||||
clientAgent = "sabnzbd"
|
||||
result = autoProcessGames().process(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
|
||||
else:
|
||||
result = 0
|
||||
|
||||
|
|
|
@ -143,7 +143,8 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5
|
|||
|
||||
# All checks done, now launching the script.
|
||||
Logger.info("MAIN: Script triggered from NZBGet, starting autoProcessMusic...")
|
||||
result = autoProcessMusic().process(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBNAME'], status)
|
||||
clientAgent = "nzbget"
|
||||
result = autoProcessMusic().process(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBFILENAME'], status, clientAgent, os.environ['NZBPP_CATEGORY'])
|
||||
# SABnzbd Pre 0.7.17
|
||||
elif len(sys.argv) == config.SABNZB_NO_OF_ARGUMENTS:
|
||||
# SABnzbd argv:
|
||||
|
@ -155,7 +156,8 @@ elif len(sys.argv) == config.SABNZB_NO_OF_ARGUMENTS:
|
|||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
Logger.info("MAIN: Script triggered from SABnzbd, starting autoProcessMusic...")
|
||||
result = autoProcessMusic().process(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||
clientAgent = "sabnzbd"
|
||||
result = autoProcessMusic().process(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
|
||||
# SABnzbd 0.7.17+
|
||||
elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
||||
# SABnzbd argv:
|
||||
|
@ -168,7 +170,8 @@ elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
|||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
# 8 Failue URL
|
||||
Logger.info("MAIN: Script triggered from SABnzbd 0.7.17+, starting autoProcessMusic...")
|
||||
result = autoProcessMusic().process(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||
clientAgent = "sabnzbd"
|
||||
result = autoProcessMusic().process(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
|
||||
else:
|
||||
result = 0
|
||||
|
||||
|
|
|
@ -135,7 +135,8 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5
|
|||
|
||||
# All checks done, now launching the script.
|
||||
Logger.info("MAIN: Script triggered from NZBGet, starting autoProcessComics...")
|
||||
result = autoProcessComics().processEpisode(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBNAME'], status)
|
||||
clientAgent = "nzbget"
|
||||
result = autoProcessComics().processEpisode(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBFILENAME'], status, clientAgent, os.environ['NZBPP_CATEGORY'])
|
||||
# SABnzbd Pre 0.7.17
|
||||
elif len(sys.argv) == config.SABNZB_NO_OF_ARGUMENTS:
|
||||
# SABnzbd argv:
|
||||
|
@ -147,7 +148,8 @@ elif len(sys.argv) == config.SABNZB_NO_OF_ARGUMENTS:
|
|||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
Logger.info("MAIN: Script triggered from SABnzbd, starting autoProcessComics...")
|
||||
result = autoProcessComics().processEpisode(sys.argv[1], sys.argv[3], sys.argv[7])
|
||||
clientAgent = "sabnzbd"
|
||||
result = autoProcessComics().processEpisode(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
|
||||
# SABnzbd 0.7.17+
|
||||
elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
||||
# SABnzbd argv:
|
||||
|
@ -160,7 +162,8 @@ elif len(sys.argv) >= config.SABNZB_0717_NO_OF_ARGUMENTS:
|
|||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
# 8 Failure URL
|
||||
Logger.info("MAIN: Script triggered from SABnzbd 0.7.17+, starting autoProcessComics...")
|
||||
result = autoProcessComics().processEpisode(sys.argv[1], sys.argv[3], sys.argv[7])
|
||||
clientAgent = "sabnzbd"
|
||||
result = autoProcessComics().processEpisode(sys.argv[1], sys.argv[2], sys.argv[7], clientAgent, sys.argv[5])
|
||||
else:
|
||||
result = 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue