summaryrefslogtreecommitdiffstats
path: root/module/api
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-30 22:02:21 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-30 22:02:21 +0100
commit9938c968ae884aa61878de409533a383ebd30c95 (patch)
treea2cab805d597eac52d400218ac37550325446f2a /module/api
parentsave and delete configs (diff)
downloadpyload-9938c968ae884aa61878de409533a383ebd30c95.tar.xz
separate addon and plugin configs
Diffstat (limited to 'module/api')
-rw-r--r--module/api/ConfigApi.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/api/ConfigApi.py b/module/api/ConfigApi.py
index e398d4bd6..527f494ce 100644
--- a/module/api/ConfigApi.py
+++ b/module/api/ConfigApi.py
@@ -67,6 +67,7 @@ class ConfigApi(ApiComponent):
"""
# TODO: include addons that are activated by default
# TODO: multi user
+ # TODO: better plugin / addon activated config
data = []
active = [x.getName() for x in self.core.addonManager.activePlugins()]
for name, config, values in self.core.config.iterSections(self.primaryUID):
@@ -76,7 +77,8 @@ class ConfigApi(ApiComponent):
item = ConfigInfo(name, config.name, config.description,
self.core.pluginManager.getCategory(name),
self.core.pluginManager.isUserPlugin(name),
- values.get("activated", False))
+ values.get("activated", None if "activated" not in config.config else config.config[
+ "activated"].default))
data.append(item)
return data
@@ -115,7 +117,7 @@ class ConfigApi(ApiComponent):
"""
for item in config.items:
self.core.config.set(config.name, item.name, item.value, sync=False, user=self.primaryUID)
- # save the changes
+ # save the changes
self.core.config.saveValues(self.primaryUID, config.name)
@RequirePerm(Permission.Plugins)