From 4f828e0a77624d2177c9b6cea55c3f35534c8607 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Sat, 19 Jan 2019 12:37:57 -0500 Subject: [PATCH] Refactor torrent class configuration --- core/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/__init__.py b/core/__init__.py index 4885c763..be1fa13e 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -914,6 +914,13 @@ def configure_passwords_file(): 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): global SHOWEXTRACT global CATEGORIES @@ -1050,8 +1057,7 @@ def initialize(section=None): CATEGORIES.extend([subsection for subsection in subsections if CFG[section][subsection].isenabled()]) CATEGORIES = list(set(CATEGORIES)) - # create torrent class - TORRENT_CLASS = create_torrent_class(TORRENT_CLIENT_AGENT) + configure_torrent_class() # finished initalizing return True