added auto_update to be entered from NZBGet config.

This commit is contained in:
clinton-hall 2014-04-16 15:53:32 +09:30
commit 4935e4b1c1

View file

@ -199,6 +199,16 @@ class ConfigObj(configobj.ConfigObj, Section):
CFG_NEW = config() CFG_NEW = config()
try: try:
section = "General"
envKeys = ['AUTO_UPDATE']
cfgKeys = ['auto_update']
for index in range(len(envKeys)):
key = 'NZBPO_' + envKeys[index]
if os.environ.has_key(key):
option = cfgKeys[index]
value = os.environ[key]
CFG_NEW[section][option] = value
section = "CouchPotato" section = "CouchPotato"
envCatKey = 'NZBPO_CPSCATEGORY' envCatKey = 'NZBPO_CPSCATEGORY'
envKeys = ['ENABLED', 'APIKEY', 'HOST', 'PORT', 'SSL', 'WEB_ROOT', 'DELAY', 'METHOD', 'DELETE_FAILED', 'REMOTECPS', 'WAIT_FOR', 'TIMEPERGIB'] envKeys = ['ENABLED', 'APIKEY', 'HOST', 'PORT', 'SSL', 'WEB_ROOT', 'DELAY', 'METHOD', 'DELETE_FAILED', 'REMOTECPS', 'WAIT_FOR', 'TIMEPERGIB']