From 01bb0b9bc195047627b712b0230ef466cc875f3b Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Thu, 30 Aug 2018 08:01:00 +1200 Subject: [PATCH] Fixed NZBGet save of Lidarr config. Fixes #1355 --- core/nzbToMediaConfig.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/nzbToMediaConfig.py b/core/nzbToMediaConfig.py index 527c7b5f..81bcdd0d 100644 --- a/core/nzbToMediaConfig.py +++ b/core/nzbToMediaConfig.py @@ -347,6 +347,8 @@ class ConfigObj(configobj.ConfigObj, Section): CFG_NEW[section][os.environ[envCatKey]] = {} CFG_NEW[section][os.environ[envCatKey]][option] = value CFG_NEW[section][os.environ[envCatKey]]['enabled'] = 1 + if os.environ[envCatKey] in CFG_NEW['Lidarr'].sections: + CFG_NEW['Lidarr'][envCatKey]['enabled'] = 0 section = "Mylar" envCatKey = 'NZBPO_MYCATEGORY' @@ -428,7 +430,7 @@ class ConfigObj(configobj.ConfigObj, Section): 'Torrent_NoLink', 'nzbExtractionBy', 'wait_for', 'delete_failed', 'remote_path'] if envCatKey in os.environ: for index in range(len(envKeys)): - key = 'NZBPO_RA{index}'.format(index=envKeys[index]) + key = 'NZBPO_LI{index}'.format(index=envKeys[index]) if key in os.environ: option = cfgKeys[index] value = os.environ[key] @@ -436,8 +438,8 @@ class ConfigObj(configobj.ConfigObj, Section): CFG_NEW[section][os.environ[envCatKey]] = {} CFG_NEW[section][os.environ[envCatKey]][option] = value CFG_NEW[section][os.environ[envCatKey]]['enabled'] = 1 - if os.environ[envCatKey] in CFG_NEW['CouchPotato'].sections: - CFG_NEW['CouchPotato'][envCatKey]['enabled'] = 0 + if os.environ[envCatKey] in CFG_NEW['HeadPhones'].sections: + CFG_NEW['HeadPhones'][envCatKey]['enabled'] = 0 section = "Extensions" envKeys = ['COMPRESSEDEXTENSIONS', 'MEDIAEXTENSIONS', 'METAEXTENSIONS']