mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 12:59:36 -07:00
continue if failed to connect to torrent client.
This commit is contained in:
parent
12ac0ef701
commit
d5cdf2ad69
1 changed files with 12 additions and 3 deletions
|
@ -95,7 +95,10 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
uniquePath = 1
|
||||
|
||||
if clientAgent != 'manual':
|
||||
nzbtomedia.pause_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
try:
|
||||
nzbtomedia.pause_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
except:
|
||||
logger.warning("Failed to pause torrent %s in %s" % (inputName, clientAgent))
|
||||
|
||||
if uniquePath:
|
||||
outputDestination = os.path.normpath(
|
||||
|
@ -221,14 +224,20 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
if clientAgent != 'manual':
|
||||
logger.error(
|
||||
"A problem was reported in the autoProcess* script. If torrent was paused we will resume seeding")
|
||||
nzbtomedia.resume_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
try:
|
||||
nzbtomedia.resume_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
except:
|
||||
logger.warning("Failed to resume torrent %s in %s" % (inputName, clientAgent))
|
||||
else:
|
||||
if clientAgent != 'manual':
|
||||
# update download status in our DB
|
||||
nzbtomedia.update_downloadInfoStatus(inputName, 1)
|
||||
|
||||
# remove torrent
|
||||
nzbtomedia.remove_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
try:
|
||||
nzbtomedia.remove_torrent(clientAgent, inputHash, inputID, inputName)
|
||||
except:
|
||||
logger.warning("Failed to delete torrent %s in %s" % (inputName, clientAgent))
|
||||
|
||||
if not sectionName == 'UserScript': # for user script, we assume this is cleaned by the script or option USER_SCRIPT_CLEAN
|
||||
# cleanup our processing folders of any misc unwanted files and empty directories
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue