From 7097b97295b011ae85b7802cd56471dab040c505 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Fri, 15 Jun 2018 22:36:52 +0100 Subject: [PATCH] Fix issue with enabled encrpyted passwords and migrating the NZBGet default password fails. --- CHANGES.md | 1 + sickbeard/__init__.py | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7d3ba10d..0b815209 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,7 @@ [develop changelog] * Fix issue when deleting files and "Send to trash for actions" is enabled * Fix submitting a bulk change +* Fix issue with enabled encrpyted passwords and migrating the NZBGet default password fails diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 7c7d996b..91c6a5ed 100755 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -921,17 +921,17 @@ def initialize(console_logging=True): # first check using official name case, then with case of legacy # todo: migrate config, (just not atm due to testing map feature) - NZBGET_USERNAME = (check_setting_str(CFG, 'NZBGet', 'nzbget_username', None) + NZBGET_USERNAME = (check_setting_str(CFG, 'NZBGet', 'nzbget_username', '') or check_setting_str(CFG, 'NZBget', 'nzbget_username', 'nzbget')) - NZBGET_PASSWORD = (check_setting_str(CFG, 'NZBGet', 'nzbget_password', None) + NZBGET_PASSWORD = (check_setting_str(CFG, 'NZBGet', 'nzbget_password', '') or check_setting_str(CFG, 'NZBget', 'nzbget_password', 'tegbzn6789')) - NZBGET_CATEGORY = (check_setting_str(CFG, 'NZBGet', 'nzbget_category', None) + NZBGET_CATEGORY = (check_setting_str(CFG, 'NZBGet', 'nzbget_category', '') or check_setting_str(CFG, 'NZBget', 'nzbget_category', 'tv')) - NZBGET_HOST = (check_setting_str(CFG, 'NZBGet', 'nzbget_host', None) + NZBGET_HOST = (check_setting_str(CFG, 'NZBGet', 'nzbget_host', '') or check_setting_str(CFG, 'NZBget', 'nzbget_host', '')) - NZBGET_USE_HTTPS = (bool(check_setting_int(CFG, 'NZBGet', 'nzbget_use_https', None)) + NZBGET_USE_HTTPS = (bool(check_setting_int(CFG, 'NZBGet', 'nzbget_use_https', 0)) or bool(check_setting_int(CFG, 'NZBget', 'nzbget_use_https', 0))) - NZBGET_PRIORITY = (check_setting_int(CFG, 'NZBGet', 'nzbget_priority', None) + NZBGET_PRIORITY = (check_setting_int(CFG, 'NZBGet', 'nzbget_priority', 0) or check_setting_int(CFG, 'NZBget', 'nzbget_priority', 100)) NZBGET_MAP = check_setting_str(CFG, 'NZBGet', 'nzbget_map', '')