From 4082dd57e5d45f76aef9e03ac2f0e0c641c1c213 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 12 May 2014 00:42:45 +0200 Subject: [PATCH] support adding missing strings to config: language --- pandora/app/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora/app/config.py b/pandora/app/config.py index 44727cca..77266203 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -79,7 +79,7 @@ def load_config(): for section in ( 'capabilities', 'cantPlay', 'itemName', 'media', 'posters', 'site', 'tv', 'user.ui', 'user.ui.part', 'user.ui.showFolder', - 'menuExtras', 'languages', 'language' + 'menuExtras', 'languages' ): parts = map(lambda p: p.replace('\0', '\\.'), section.replace('\\.', '\0').split('.')) #print 'checking', section @@ -105,6 +105,10 @@ def load_config(): sys.stderr.write("adding default value for %s.%s = %s\n" % ( section, key, str(d[key]))) c[key] = d[key] + for key in ('language', ): + if not key in config: + sys.stderr.write("adding default value for %s = %s\n" % (key, default[key])) + config[key] = default[key] key = get_by_id(config['itemKeys'], 'title') if not 'autocompleteSort' in key: