mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
Refactor torrent class configuration
This commit is contained in:
parent
e85b92f1db
commit
4f828e0a77
1 changed files with 8 additions and 2 deletions
|
@ -914,6 +914,13 @@ def configure_passwords_file():
|
||||||
PASSWORDS_FILE = CFG['passwords']['PassWordFile']
|
PASSWORDS_FILE = CFG['passwords']['PassWordFile']
|
||||||
|
|
||||||
|
|
||||||
|
def configure_torrent_class():
|
||||||
|
global TORRENT_CLASS
|
||||||
|
|
||||||
|
# create torrent class
|
||||||
|
TORRENT_CLASS = create_torrent_class(TORRENT_CLIENT_AGENT)
|
||||||
|
|
||||||
|
|
||||||
def initialize(section=None):
|
def initialize(section=None):
|
||||||
global SHOWEXTRACT
|
global SHOWEXTRACT
|
||||||
global CATEGORIES
|
global CATEGORIES
|
||||||
|
@ -1050,8 +1057,7 @@ def initialize(section=None):
|
||||||
CATEGORIES.extend([subsection for subsection in subsections if CFG[section][subsection].isenabled()])
|
CATEGORIES.extend([subsection for subsection in subsections if CFG[section][subsection].isenabled()])
|
||||||
CATEGORIES = list(set(CATEGORIES))
|
CATEGORIES = list(set(CATEGORIES))
|
||||||
|
|
||||||
# create torrent class
|
configure_torrent_class()
|
||||||
TORRENT_CLASS = create_torrent_class(TORRENT_CLIENT_AGENT)
|
|
||||||
|
|
||||||
# finished initalizing
|
# finished initalizing
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue