mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 16:22:57 -07:00
Null do not download keys for get_settings API command
This commit is contained in:
parent
71d64a4b3f
commit
c78bef851e
1 changed files with 8 additions and 7 deletions
|
@ -289,32 +289,33 @@ class API2(object):
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
|
|
||||||
interface_dir = os.path.join(plexpy.PROG_DIR, 'data/interfaces/')
|
interface_dir = os.path.join(plexpy.PROG_DIR, 'data/interfaces/')
|
||||||
interface_list = [name for name in os.listdir(interface_dir) if
|
interface_list = [name for name in os.listdir(interface_dir) if
|
||||||
os.path.isdir(os.path.join(interface_dir, name))]
|
os.path.isdir(os.path.join(interface_dir, name))]
|
||||||
|
|
||||||
conf = plexpy.CONFIG._config
|
conf = plexpy.CONFIG._config
|
||||||
config = {}
|
settings = {}
|
||||||
|
|
||||||
# Truthify the dict
|
# Truthify the dict
|
||||||
for k, v in conf.items():
|
for k, v in conf.items():
|
||||||
if isinstance(v, dict):
|
if isinstance(v, dict):
|
||||||
d = {}
|
d = {}
|
||||||
for kk, vv in v.items():
|
for kk, vv in v.items():
|
||||||
|
if kk.upper() in config._DO_NOT_DOWNLOAD_KEYS:
|
||||||
|
vv = None
|
||||||
if vv == '0' or vv == '1':
|
if vv == '0' or vv == '1':
|
||||||
d[kk] = bool(vv)
|
d[kk] = bool(vv)
|
||||||
else:
|
else:
|
||||||
d[kk] = vv
|
d[kk] = vv
|
||||||
config[k] = d
|
settings[k] = d
|
||||||
if k == 'General':
|
if k == 'General':
|
||||||
config[k]['interface'] = interface_dir
|
settings[k]['interface'] = interface_dir
|
||||||
config[k]['interface_list'] = interface_list
|
settings[k]['interface_list'] = interface_list
|
||||||
|
|
||||||
if key:
|
if key:
|
||||||
return config.get(key)
|
return settings.get(key)
|
||||||
|
|
||||||
return config
|
return settings
|
||||||
|
|
||||||
def sql(self, query=''):
|
def sql(self, query=''):
|
||||||
""" Query the Tautulli database with raw SQL. Automatically makes a backup of
|
""" Query the Tautulli database with raw SQL. Automatically makes a backup of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue