mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
Refactor torrent categories configuration
This commit is contained in:
parent
1906d62664
commit
cf0fc1296f
1 changed files with 9 additions and 6 deletions
|
@ -483,12 +483,19 @@ def configure_flattening():
|
||||||
NOFLATTEN = NOFLATTEN.split(',')
|
NOFLATTEN = NOFLATTEN.split(',')
|
||||||
|
|
||||||
|
|
||||||
|
def configure_torrent_categories():
|
||||||
|
global CATEGORIES
|
||||||
|
|
||||||
|
CATEGORIES = (CFG['Torrent']['categories']) # music,music_videos,pictures,software
|
||||||
|
if isinstance(CATEGORIES, str):
|
||||||
|
CATEGORIES = CATEGORIES.split(',')
|
||||||
|
|
||||||
|
|
||||||
def configure_torrents():
|
def configure_torrents():
|
||||||
global TORRENT_CLIENT_AGENT
|
global TORRENT_CLIENT_AGENT
|
||||||
global USE_LINK
|
global USE_LINK
|
||||||
global OUTPUT_DIRECTORY
|
global OUTPUT_DIRECTORY
|
||||||
global TORRENT_DEFAULT_DIRECTORY
|
global TORRENT_DEFAULT_DIRECTORY
|
||||||
global CATEGORIES
|
|
||||||
global DELETE_ORIGINAL
|
global DELETE_ORIGINAL
|
||||||
global TORRENT_CHMOD_DIRECTORY
|
global TORRENT_CHMOD_DIRECTORY
|
||||||
global TORRENT_RESUME_ON_FAILURE
|
global TORRENT_RESUME_ON_FAILURE
|
||||||
|
@ -498,12 +505,8 @@ def configure_torrents():
|
||||||
USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym
|
USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym
|
||||||
OUTPUT_DIRECTORY = CFG['Torrent']['outputDirectory'] # /abs/path/to/complete/
|
OUTPUT_DIRECTORY = CFG['Torrent']['outputDirectory'] # /abs/path/to/complete/
|
||||||
TORRENT_DEFAULT_DIRECTORY = CFG['Torrent']['default_downloadDirectory']
|
TORRENT_DEFAULT_DIRECTORY = CFG['Torrent']['default_downloadDirectory']
|
||||||
CATEGORIES = (CFG['Torrent']['categories']) # music,music_videos,pictures,software
|
|
||||||
|
|
||||||
configure_flattening()
|
configure_flattening()
|
||||||
|
configure_torrent_categories()
|
||||||
if isinstance(CATEGORIES, str):
|
|
||||||
CATEGORIES = CATEGORIES.split(',')
|
|
||||||
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'])
|
TORRENT_RESUME_ON_FAILURE = int(CFG['Torrent']['resumeOnFailure'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue