|
|
@ -444,7 +444,7 @@ __INITIALIZED__ = False |
|
|
|
def initialize(consoleLogging=True): |
|
|
|
with INIT_LOCK: |
|
|
|
|
|
|
|
global BRANCH, ACTUAL_LOG_DIR, LOG_DIR, WEB_PORT, WEB_LOG, ENCRYPTION_VERSION, WEB_ROOT, WEB_USERNAME, WEB_PASSWORD, WEB_HOST, WEB_IPV6, USE_API, API_KEY, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, \ |
|
|
|
global BRANCH, CUR_COMMIT_HASH, ACTUAL_LOG_DIR, LOG_DIR, WEB_PORT, WEB_LOG, ENCRYPTION_VERSION, WEB_ROOT, WEB_USERNAME, WEB_PASSWORD, WEB_HOST, WEB_IPV6, USE_API, API_KEY, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, \ |
|
|
|
HANDLE_REVERSE_PROXY, USE_NZBS, USE_TORRENTS, NZB_METHOD, NZB_DIR, DOWNLOAD_PROPERS, CHECK_PROPERS_INTERVAL, ALLOW_HIGH_PRIORITY, TORRENT_METHOD, \ |
|
|
|
SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, SAB_HOST, \ |
|
|
|
NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_PRIORITY, NZBGET_HOST, NZBGET_USE_HTTPS, backlogSearchScheduler, \ |
|
|
@ -514,6 +514,9 @@ def initialize(consoleLogging=True): |
|
|
|
# branch |
|
|
|
BRANCH = check_setting_str(CFG, 'General', 'branch', '') |
|
|
|
|
|
|
|
# current commit hash |
|
|
|
CUR_COMMIT_HASH = check_setting_str(CFG, 'General', 'cur_commit_hash', '') |
|
|
|
|
|
|
|
ACTUAL_CACHE_DIR = check_setting_str(CFG, 'General', 'cache_dir', 'cache') |
|
|
|
# fix bad configs due to buggy code |
|
|
|
if ACTUAL_CACHE_DIR == 'None': |
|
|
@ -1306,6 +1309,7 @@ def save_config(): |
|
|
|
# For passwords you must include the word `password` in the item_name and add `helpers.encrypt(ITEM_NAME, ENCRYPTION_VERSION)` in save_config() |
|
|
|
new_config['General'] = {} |
|
|
|
new_config['General']['branch'] = BRANCH |
|
|
|
new_config['General']['cur_commit_hash'] = CUR_COMMIT_HASH |
|
|
|
new_config['General']['config_version'] = CONFIG_VERSION |
|
|
|
new_config['General']['encryption_version'] = int(ENCRYPTION_VERSION) |
|
|
|
new_config['General']['log_dir'] = ACTUAL_LOG_DIR if ACTUAL_LOG_DIR else 'Logs' |
|
|
|