documentRightsLevel
This commit is contained in:
parent
c640d1253e
commit
2bfaf3809b
1 changed files with 9 additions and 1 deletions
|
@ -107,7 +107,7 @@ def load_config(init=False):
|
||||||
# add missing defaults
|
# add missing defaults
|
||||||
for section in sorted((
|
for section in sorted((
|
||||||
'capabilities', 'cantPlay',
|
'capabilities', 'cantPlay',
|
||||||
'documentKeys', 'documentRightsLevels', 'documentRightsLevel',
|
'documentKeys', 'documentRightsLevels',
|
||||||
'entities', 'itemName', 'itemTitleKeys', 'itemKeys', 'media', 'posters',
|
'entities', 'itemName', 'itemTitleKeys', 'itemKeys', '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'
|
||||||
|
@ -139,6 +139,14 @@ 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')
|
||||||
|
|
||||||
|
key = 'documentRightsLevel'
|
||||||
|
if key not in config:
|
||||||
|
config[key] = {}
|
||||||
|
for level in config['userLevels']:
|
||||||
|
if level not in config[key]:
|
||||||
|
config[key] = default.get(key, 0)
|
||||||
|
|
||||||
for key in ('language', 'importMetadata'):
|
for key in ('language', 'importMetadata'):
|
||||||
if key not 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])))
|
||||||
|
|
Loading…
Reference in a new issue