mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
Fixed it so autoProcessMovie returns success if clientAgent is not a torrent client when download_id is empty
This commit is contained in:
parent
5e5f00de0c
commit
939cc3235b
2 changed files with 6 additions and 1 deletions
|
@ -198,6 +198,7 @@ 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']
|
||||
Logger.info("MAIN: Script triggered from NZBGet, starting autoProcessMovie...")
|
||||
result = autoProcessMovie().process(os.environ['NZBPP_DIRECTORY'], os.environ['NZBPP_NZBFILENAME'], clientAgent="nzbget", inputCategory=os.environ['NZBPP_CATEGORY'])
|
||||
|
|
|
@ -214,6 +214,7 @@ class autoProcessMovie:
|
|||
protocol = "https://"
|
||||
else:
|
||||
protocol = "http://"
|
||||
|
||||
# don't delay when we are calling this script manually.
|
||||
if clientAgent == "manual":
|
||||
delay = 0
|
||||
|
@ -304,7 +305,10 @@ class autoProcessMovie:
|
|||
if clientAgent == "manual":
|
||||
return 0 # success
|
||||
if not download_id:
|
||||
return 1 # just to be sure TorrentToMedia doesn't start deleting files as we havent verified changed status.
|
||||
if clientAgent in ['utorrent', 'transmission', 'deluge'] :
|
||||
return 1 # just to be sure TorrentToMedia doesn't start deleting files as we havent verified changed status.
|
||||
else:
|
||||
return 0
|
||||
|
||||
# we will now check to see if CPS has finished renaming before returning to TorrentToMedia and unpausing.
|
||||
socket.setdefaulttimeout(int(config.NZBTOMEDIA_TIMEOUT)) #initialize socket timeout.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue