mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 12:59:36 -07:00
parent
4daaf6263f
commit
c77ce99ed7
3 changed files with 6 additions and 1 deletions
|
@ -248,6 +248,7 @@
|
|||
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
|
||||
deleteOriginal = 0
|
||||
chmodDirecotry = 0
|
||||
resume = 1
|
||||
resumeOnFailure = 1
|
||||
|
||||
[Extensions]
|
||||
|
|
|
@ -103,6 +103,7 @@ NOFLATTEN = []
|
|||
DELETE_ORIGINAL = None
|
||||
TORRENT_CHMOD_DIRECTORY = None
|
||||
TORRENT_DEFAULTDIR = None
|
||||
TORRENT_RESUME = None
|
||||
TORRENT_RESUME_ON_FAILURE = None
|
||||
|
||||
REMOTEPATHS = []
|
||||
|
@ -218,7 +219,7 @@ def initialize(section=None):
|
|||
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, \
|
||||
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, TORRENT_RESUME
|
||||
|
||||
if __INITIALIZED__:
|
||||
return False
|
||||
|
@ -346,6 +347,7 @@ def initialize(section=None):
|
|||
DELETE_ORIGINAL = int(CFG["Torrent"]["deleteOriginal"])
|
||||
TORRENT_CHMOD_DIRECTORY = int(CFG["Torrent"]["chmodDirecotry"], 8)
|
||||
TORRENT_RESUME_ON_FAILURE = int(CFG["Torrent"]["resumeOnFailure"])
|
||||
TORRENT_RESUME = int(CFG["Torrent"]["resume"])
|
||||
UTORRENTWEBUI = CFG["Torrent"]["uTorrentWEBui"] # http://localhost:8090/gui/
|
||||
UTORRENTUSR = CFG["Torrent"]["uTorrentUSR"] # mysecretusr
|
||||
UTORRENTPWD = CFG["Torrent"]["uTorrentPWD"] # mysecretpwr
|
||||
|
|
|
@ -753,6 +753,8 @@ def pause_torrent(clientAgent, inputHash, inputID, inputName):
|
|||
logger.warning("Failed to stop torrent %s in %s" % (inputName, clientAgent))
|
||||
|
||||
def resume_torrent(clientAgent, inputHash, inputID, inputName):
|
||||
if not core.TORRENT_RESUME == 1:
|
||||
return
|
||||
logger.debug("Starting torrent %s in %s" % (inputName, clientAgent))
|
||||
try:
|
||||
if clientAgent == 'utorrent' and core.TORRENT_CLASS != "":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue