From 3f60d1f8de4477a735c9477327fad82d7860f1ff Mon Sep 17 00:00:00 2001 From: Ade Date: Wed, 2 Sep 2015 21:16:22 +1200 Subject: [PATCH] torznab config issues --- data/interfaces/default/config.html | 2 +- headphones/config.py | 8 ++++---- headphones/webserve.py | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index e2d994fd..886a1f84 100644 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -552,7 +552,7 @@
- +
diff --git a/headphones/config.py b/headphones/config.py index 67b7af72..9e5c713d 100644 --- a/headphones/config.py +++ b/headphones/config.py @@ -141,10 +141,6 @@ _CONFIG_DEFINITIONS = { 'NEWZNAB_APIKEY': (str, 'Newznab', ''), 'NEWZNAB_ENABLED': (int, 'Newznab', 1), 'NEWZNAB_HOST': (str, 'Newznab', ''), - 'TORZNAB': (int, 'Torznab', 0), - 'TORZNAB_APIKEY': (str, 'Torznab', ''), - 'TORZNAB_ENABLED': (int, 'Torznab', 1), - 'TORZNAB_HOST': (str, 'Torznab', ''), 'NMA_APIKEY': (str, 'NMA', ''), 'NMA_ENABLED': (int, 'NMA', 0), 'NMA_ONSNATCH': (int, 'NMA', 0), @@ -232,6 +228,10 @@ _CONFIG_DEFINITIONS = { 'TORRENTBLACKHOLE_DIR': (str, 'General', ''), 'TORRENT_DOWNLOADER': (int, 'General', 0), 'TORRENT_REMOVAL_INTERVAL': (int, 'General', 720), + 'TORZNAB': (int, 'Torznab', 0), + 'TORZNAB_APIKEY': (str, 'Torznab', ''), + 'TORZNAB_ENABLED': (int, 'Torznab', 1), + 'TORZNAB_HOST': (str, 'Torznab', ''), 'TRANSMISSION_HOST': (str, 'Transmission', ''), 'TRANSMISSION_PASSWORD': (str, 'Transmission', ''), 'TRANSMISSION_USERNAME': (str, 'Transmission', ''), diff --git a/headphones/webserve.py b/headphones/webserve.py index 59418d28..1fe0948e 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -1361,13 +1361,15 @@ class WebInterface(object): del kwargs[extra] headphones.CONFIG.EXTRAS = ','.join(str(n) for n in temp_extras_list) + headphones.CONFIG.clear_extra_newznabs() + headphones.CONFIG.clear_extra_torznabs() + headphones.CONFIG.process_kwargs(kwargs) + for extra_newznab in extra_newznabs: headphones.CONFIG.add_extra_newznab(extra_newznab) - headphones.CONFIG.clear_extra_torznabs() - headphones.CONFIG.process_kwargs(kwargs) for extra_torznab in extra_torznabs: headphones.CONFIG.add_extra_torznab(extra_torznab)