forked from 0x2620/pandora
set default config importMetadata
This commit is contained in:
parent
0430a0f236
commit
7f8b5448e6
1 changed files with 4 additions and 4 deletions
|
@ -95,14 +95,14 @@ def load_config(init=False):
|
||||||
config['keys'][key['id']] = key
|
config['keys'][key['id']] = key
|
||||||
|
|
||||||
|
|
||||||
#add missing defaults
|
# add missing defaults
|
||||||
for section in sorted((
|
for section in sorted((
|
||||||
'capabilities', 'cantPlay', 'entities', 'itemName', 'itemTitleKeys', 'media', 'posters',
|
'capabilities', 'cantPlay', 'entities', 'itemName', 'itemTitleKeys', 'media', 'posters',
|
||||||
'site', 'tv', 'user.ui', 'user.ui.part', 'user.ui.showFolder',
|
'site', 'tv', 'user.ui', 'user.ui.part', 'user.ui.showFolder',
|
||||||
'menuExtras', 'languages'
|
'menuExtras', 'languages'
|
||||||
)):
|
)):
|
||||||
parts = map(lambda p: p.replace('\0', '\\.'), section.replace('\\.', '\0').split('.'))
|
parts = map(lambda p: p.replace('\0', '\\.'), section.replace('\\.', '\0').split('.'))
|
||||||
#print('checking', section)
|
# print('checking', section)
|
||||||
c = config
|
c = config
|
||||||
d = default
|
d = default
|
||||||
while len(parts):
|
while len(parts):
|
||||||
|
@ -128,8 +128,8 @@ def load_config(init=False):
|
||||||
if added:
|
if added:
|
||||||
sys.stderr.write("adding default %s:\n\t" % section)
|
sys.stderr.write("adding default %s:\n\t" % section)
|
||||||
sys.stderr.write("\n\t".join(added) + '\n\n')
|
sys.stderr.write("\n\t".join(added) + '\n\n')
|
||||||
for key in ('language', ):
|
for key in ('language', 'importMetadata'):
|
||||||
if not key in config:
|
if key not in config:
|
||||||
sys.stderr.write("adding default value:\n\t\"%s\": %s,\n\n" % (key, json.dumps(default[key])))
|
sys.stderr.write("adding default value:\n\t\"%s\": %s,\n\n" % (key, json.dumps(default[key])))
|
||||||
config[key] = default[key]
|
config[key] = default[key]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue