mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
Fixed bug that was caused by manual run of torrentToMedia
This commit is contained in:
parent
6c3096851b
commit
e206829834
2 changed files with 3 additions and 2 deletions
|
@ -201,7 +201,7 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID)
|
||||||
logger.postprocess("Calling Gamez:" + inputCategory + " to post-process: %s", inputName)
|
logger.postprocess("Calling Gamez:" + inputCategory + " to post-process: %s", inputName)
|
||||||
result = autoProcessGames().process(outputDestination, inputName, status, nzbtomedia.CLIENTAGENT, inputCategory)
|
result = autoProcessGames().process(outputDestination, inputName, status, nzbtomedia.CLIENTAGENT, inputCategory)
|
||||||
|
|
||||||
if result == 1:
|
if result == 1 and not nzbtomedia.CLIENTAGENT == 'manual':
|
||||||
logger.error("A problem was reported in the autoProcess* script. If torrent was paused we will resume seeding")
|
logger.error("A problem was reported in the autoProcess* script. If torrent was paused we will resume seeding")
|
||||||
|
|
||||||
resume_torrent(nzbtomedia.CLIENTAGENT, TorrentClass, inputHash, inputID, result, inputName)
|
resume_torrent(nzbtomedia.CLIENTAGENT, TorrentClass, inputHash, inputID, result, inputName)
|
||||||
|
@ -338,6 +338,7 @@ def main():
|
||||||
|
|
||||||
# check if this is a manual run
|
# check if this is a manual run
|
||||||
if inputDirectory is None:
|
if inputDirectory is None:
|
||||||
|
nzbtomedia.CLIENTAGENT = 'manual'
|
||||||
logger.warning("Invalid number of arguments received from client, Switching to manual run mode ...")
|
logger.warning("Invalid number of arguments received from client, Switching to manual run mode ...")
|
||||||
for section, subsection in nzbtomedia.SUBSECTIONS.items():
|
for section, subsection in nzbtomedia.SUBSECTIONS.items():
|
||||||
for category in subsection:
|
for category in subsection:
|
||||||
|
|
|
@ -268,7 +268,7 @@ class autoProcessMovie:
|
||||||
delete(dirName)
|
delete(dirName)
|
||||||
return 0 # success
|
return 0 # success
|
||||||
|
|
||||||
if not release_id:
|
if not download_id or not release_id:
|
||||||
if clientAgent in ['utorrent', 'transmission', 'deluge'] :
|
if clientAgent in ['utorrent', 'transmission', 'deluge'] :
|
||||||
return 1 # just to be sure TorrentToMedia doesn't start deleting files as we havent verified changed status.
|
return 1 # just to be sure TorrentToMedia doesn't start deleting files as we havent verified changed status.
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue