SABnzbd-Suite: *merge* default settings

This commit is contained in:
Stefan Saraev 2012-06-19 16:02:45 +03:00
parent 59c4341171
commit a5a46d48dd

View File

@ -140,19 +140,19 @@ couchpotato_launch = getAddonSetting(suiteSettings, 'COUCHPOTATO_LAUNCH')
couchpotato_version = getAddonSetting(suiteSettings, 'COUCHPOTATO_VERSION') couchpotato_version = getAddonSetting(suiteSettings, 'COUCHPOTATO_VERSION')
headphones_launch = getAddonSetting(suiteSettings, 'HEADPHONES_LAUNCH') headphones_launch = getAddonSetting(suiteSettings, 'HEADPHONES_LAUNCH')
########## # merge defaults
# safe defaults. this is ugly fDefaultSuiteSettings = open(pDefaultSuiteSettings, 'r')
# someone with better knowledge in xbmc addon api data = fDefaultSuiteSettings.read()
# please fix fDefaultSuiteSettings.close
DefaultSuiteSettings = parseString(data)
if not sickbeard_launch: if not sickbeard_launch:
sickbeard_launch = "true" sickbeard_launch = getAddonSetting(DefaultSuiteSettings, 'SICKBEARD_LAUNCH')
if not couchpotato_launch: if not couchpotato_launch:
couchpotato_launch = "true" couchpotato_launch = getAddonSetting(DefaultSuiteSettings, 'COUCHPOTATO_LAUNCH')
if not couchpotato_version: if not couchpotato_version:
couchpotato_version = "0" couchpotato_version = getAddonSetting(DefaultSuiteSettings, 'COUCHPOTATO_VERSION')
if not headphones_launch: if not headphones_launch:
headphones_launch = "true" headphones_launch = getAddonSetting(DefaultSuiteSettings, 'HEADPHONES_LAUNCH')
##########
# XBMC # XBMC
fXbmcSettings = open(pXbmcSettings, 'r') fXbmcSettings = open(pXbmcSettings, 'r')