mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
Refactor flatenning configuration
This commit is contained in:
parent
218e082ec7
commit
1906d62664
1 changed files with 11 additions and 4 deletions
|
@ -475,13 +475,20 @@ def configure_qbittorrent():
|
|||
QBITTORRENT_PASSWORD = CFG['Torrent']['qBittorrentPWD'] # mysecretpwr
|
||||
|
||||
|
||||
def configure_flattening():
|
||||
global NOFLATTEN
|
||||
|
||||
NOFLATTEN = (CFG['Torrent']['noFlatten'])
|
||||
if isinstance(NOFLATTEN, str):
|
||||
NOFLATTEN = NOFLATTEN.split(',')
|
||||
|
||||
|
||||
def configure_torrents():
|
||||
global TORRENT_CLIENT_AGENT
|
||||
global USE_LINK
|
||||
global OUTPUT_DIRECTORY
|
||||
global TORRENT_DEFAULT_DIRECTORY
|
||||
global CATEGORIES
|
||||
global NOFLATTEN
|
||||
global DELETE_ORIGINAL
|
||||
global TORRENT_CHMOD_DIRECTORY
|
||||
global TORRENT_RESUME_ON_FAILURE
|
||||
|
@ -492,9 +499,9 @@ def configure_torrents():
|
|||
OUTPUT_DIRECTORY = CFG['Torrent']['outputDirectory'] # /abs/path/to/complete/
|
||||
TORRENT_DEFAULT_DIRECTORY = CFG['Torrent']['default_downloadDirectory']
|
||||
CATEGORIES = (CFG['Torrent']['categories']) # music,music_videos,pictures,software
|
||||
NOFLATTEN = (CFG['Torrent']['noFlatten'])
|
||||
if isinstance(NOFLATTEN, str):
|
||||
NOFLATTEN = NOFLATTEN.split(',')
|
||||
|
||||
configure_flattening()
|
||||
|
||||
if isinstance(CATEGORIES, str):
|
||||
CATEGORIES = CATEGORIES.split(',')
|
||||
DELETE_ORIGINAL = int(CFG['Torrent']['deleteOriginal'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue