mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
Refactor torrent resuming configuration
This commit is contained in:
parent
cf0fc1296f
commit
f23eccc050
1 changed files with 9 additions and 5 deletions
|
@ -491,6 +491,14 @@ def configure_torrent_categories():
|
||||||
CATEGORIES = CATEGORIES.split(',')
|
CATEGORIES = CATEGORIES.split(',')
|
||||||
|
|
||||||
|
|
||||||
|
def configure_torrent_resuming():
|
||||||
|
global TORRENT_RESUME
|
||||||
|
global TORRENT_RESUME_ON_FAILURE
|
||||||
|
|
||||||
|
TORRENT_RESUME_ON_FAILURE = int(CFG['Torrent']['resumeOnFailure'])
|
||||||
|
TORRENT_RESUME = int(CFG['Torrent']['resume'])
|
||||||
|
|
||||||
|
|
||||||
def configure_torrents():
|
def configure_torrents():
|
||||||
global TORRENT_CLIENT_AGENT
|
global TORRENT_CLIENT_AGENT
|
||||||
global USE_LINK
|
global USE_LINK
|
||||||
|
@ -498,8 +506,6 @@ def configure_torrents():
|
||||||
global TORRENT_DEFAULT_DIRECTORY
|
global TORRENT_DEFAULT_DIRECTORY
|
||||||
global DELETE_ORIGINAL
|
global DELETE_ORIGINAL
|
||||||
global TORRENT_CHMOD_DIRECTORY
|
global TORRENT_CHMOD_DIRECTORY
|
||||||
global TORRENT_RESUME_ON_FAILURE
|
|
||||||
global TORRENT_RESUME
|
|
||||||
|
|
||||||
TORRENT_CLIENT_AGENT = CFG['Torrent']['clientAgent'] # utorrent | deluge | transmission | rtorrent | vuze | qbittorrent |other
|
TORRENT_CLIENT_AGENT = CFG['Torrent']['clientAgent'] # utorrent | deluge | transmission | rtorrent | vuze | qbittorrent |other
|
||||||
USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym
|
USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym
|
||||||
|
@ -509,9 +515,7 @@ def configure_torrents():
|
||||||
configure_torrent_categories()
|
configure_torrent_categories()
|
||||||
DELETE_ORIGINAL = int(CFG['Torrent']['deleteOriginal'])
|
DELETE_ORIGINAL = int(CFG['Torrent']['deleteOriginal'])
|
||||||
TORRENT_CHMOD_DIRECTORY = int(str(CFG['Torrent']['chmodDirectory']), 8)
|
TORRENT_CHMOD_DIRECTORY = int(str(CFG['Torrent']['chmodDirectory']), 8)
|
||||||
TORRENT_RESUME_ON_FAILURE = int(CFG['Torrent']['resumeOnFailure'])
|
configure_torrent_resuming()
|
||||||
TORRENT_RESUME = int(CFG['Torrent']['resume'])
|
|
||||||
|
|
||||||
configure_utorrent()
|
configure_utorrent()
|
||||||
configure_transmission()
|
configure_transmission()
|
||||||
configure_deluge()
|
configure_deluge()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue