diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-30 22:02:21 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-30 22:02:21 +0100 |
commit | 9938c968ae884aa61878de409533a383ebd30c95 (patch) | |
tree | a2cab805d597eac52d400218ac37550325446f2a /module/api | |
parent | save and delete configs (diff) | |
download | pyload-9938c968ae884aa61878de409533a383ebd30c95.tar.xz |
separate addon and plugin configs
Diffstat (limited to 'module/api')
-rw-r--r-- | module/api/ConfigApi.py | 6 |
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) |