mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Add the ability to not resume torrent on failure
This commit is contained in:
parent
ab4d02a240
commit
0d1e27c093
3 changed files with 7 additions and 2 deletions
|
@ -223,7 +223,9 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
||||||
plex_update(inputCategory)
|
plex_update(inputCategory)
|
||||||
|
|
||||||
if result[0] != 0:
|
if result[0] != 0:
|
||||||
if clientAgent != 'manual':
|
if core.TORRENT_RESUME_ON_FAILURE:
|
||||||
|
logger.error("A problem was reported in the autoProcess* script. torrent won't resume seeding (settings)")
|
||||||
|
elif clientAgent != 'manual':
|
||||||
logger.error(
|
logger.error(
|
||||||
"A problem was reported in the autoProcess* script. If torrent was paused we will resume seeding")
|
"A problem was reported in the autoProcess* script. If torrent was paused we will resume seeding")
|
||||||
core.resume_torrent(clientAgent, inputHash, inputID, inputName)
|
core.resume_torrent(clientAgent, inputHash, inputID, inputName)
|
||||||
|
|
|
@ -240,6 +240,7 @@
|
||||||
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
|
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
|
||||||
deleteOriginal = 0
|
deleteOriginal = 0
|
||||||
chmodDirecotry = 0
|
chmodDirecotry = 0
|
||||||
|
resumeOnFailure = 1
|
||||||
|
|
||||||
[Extensions]
|
[Extensions]
|
||||||
compressedExtensions = .zip,.rar,.7z,.gz,.bz,.tar,.arj,.1,.01,.001
|
compressedExtensions = .zip,.rar,.7z,.gz,.bz,.tar,.arj,.1,.01,.001
|
||||||
|
|
|
@ -100,6 +100,7 @@ NOFLATTEN = []
|
||||||
DELETE_ORIGINAL = None
|
DELETE_ORIGINAL = None
|
||||||
TORRENT_CHMOD_DIRECTORY = None
|
TORRENT_CHMOD_DIRECTORY = None
|
||||||
TORRENT_DEFAULTDIR = None
|
TORRENT_DEFAULTDIR = None
|
||||||
|
TORRENT_RESUME_ON_FAILURE = None
|
||||||
|
|
||||||
REMOTEPATHS = []
|
REMOTEPATHS = []
|
||||||
|
|
||||||
|
@ -213,7 +214,7 @@ def initialize(section=None):
|
||||||
NICENESS, LOG_DEBUG, FORCE_CLEAN, FFMPEG_PATH, FFMPEG, FFPROBE, AUDIOCONTAINER, EXTCONTAINER, TORRENT_CLASS, \
|
NICENESS, LOG_DEBUG, FORCE_CLEAN, FFMPEG_PATH, FFMPEG, FFPROBE, AUDIOCONTAINER, EXTCONTAINER, TORRENT_CLASS, \
|
||||||
DELETE_ORIGINAL, TORRENT_CHMOD_DIRECTORY, PASSWORDSFILE, USER_DELAY, USER_SCRIPT, USER_SCRIPT_CLEAN, USER_SCRIPT_MEDIAEXTENSIONS, \
|
DELETE_ORIGINAL, TORRENT_CHMOD_DIRECTORY, PASSWORDSFILE, USER_DELAY, USER_SCRIPT, USER_SCRIPT_CLEAN, USER_SCRIPT_MEDIAEXTENSIONS, \
|
||||||
USER_SCRIPT_PARAM, USER_SCRIPT_RUNONCE, USER_SCRIPT_SUCCESSCODES, DOWNLOADINFO, CHECK_MEDIA, SAFE_MODE, \
|
USER_SCRIPT_PARAM, USER_SCRIPT_RUNONCE, USER_SCRIPT_SUCCESSCODES, DOWNLOADINFO, CHECK_MEDIA, SAFE_MODE, \
|
||||||
TORRENT_DEFAULTDIR, NZB_DEFAULTDIR, REMOTEPATHS, LOG_ENV, PID_FILE, MYAPP, ACHANNELS, ACHANNELS2, ACHANNELS3, \
|
TORRENT_DEFAULTDIR, TORRENT_RESUME_ON_FAILURE, NZB_DEFAULTDIR, REMOTEPATHS, LOG_ENV, PID_FILE, MYAPP, ACHANNELS, ACHANNELS2, ACHANNELS3, \
|
||||||
PLEXSSL, PLEXHOST, PLEXPORT, PLEXTOKEN, PLEXSEC
|
PLEXSSL, PLEXHOST, PLEXPORT, PLEXTOKEN, PLEXSEC
|
||||||
|
|
||||||
if __INITIALIZED__:
|
if __INITIALIZED__:
|
||||||
|
@ -341,6 +342,7 @@ def initialize(section=None):
|
||||||
if isinstance(CATEGORIES, str): CATEGORIES = CATEGORIES.split(',')
|
if isinstance(CATEGORIES, str): CATEGORIES = CATEGORIES.split(',')
|
||||||
DELETE_ORIGINAL = int(CFG["Torrent"]["deleteOriginal"])
|
DELETE_ORIGINAL = int(CFG["Torrent"]["deleteOriginal"])
|
||||||
TORRENT_CHMOD_DIRECTORY = int(CFG["Torrent"]["chmodDirecotry"], 8)
|
TORRENT_CHMOD_DIRECTORY = int(CFG["Torrent"]["chmodDirecotry"], 8)
|
||||||
|
TORRENT_RESUME_ON_FAILURE = int(CFG["Torrent"]["resumeOnFailure"])
|
||||||
UTORRENTWEBUI = CFG["Torrent"]["uTorrentWEBui"] # http://localhost:8090/gui/
|
UTORRENTWEBUI = CFG["Torrent"]["uTorrentWEBui"] # http://localhost:8090/gui/
|
||||||
UTORRENTUSR = CFG["Torrent"]["uTorrentUSR"] # mysecretusr
|
UTORRENTUSR = CFG["Torrent"]["uTorrentUSR"] # mysecretusr
|
||||||
UTORRENTPWD = CFG["Torrent"]["uTorrentPWD"] # mysecretpwr
|
UTORRENTPWD = CFG["Torrent"]["uTorrentPWD"] # mysecretpwr
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue