diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-20 21:28:55 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-20 21:28:55 +0100 |
commit | f791fb1a40240595ddc8d5b77b359f70253a0d10 (patch) | |
tree | 1eb8dc1e1a3193b525f9e482b5768d480429b55d | |
parent | plugintester fix (diff) | |
download | pyload-f791fb1a40240595ddc8d5b77b359f70253a0d10.tar.xz |
closed #519
-rw-r--r-- | module/Api.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/module/Api.py b/module/Api.py index ac9ea7f79..5dc8916b1 100644 --- a/module/Api.py +++ b/module/Api.py @@ -137,10 +137,10 @@ class Api(Iface): :return: list of `ConfigSection` """ - return [ConfigSection(section, data.name, data.description, data.long_desc, [ - ConfigItem(option, d.name, d.description, d.type, d.default, self.core.config.get(section, option)) for - option, d in data.config.iteritems()]) for - section, data in self.core.config.getBaseSectionns()] + return dict([(section, ConfigSection(section, data.name, data.description, data.long_desc, [ + ConfigItem(option, d.name, d.description, d.type, to_string(d.default), to_string(self.core.config.get(section, option))) for + option, d in data.config.iteritems()])) for + section, data in self.core.config.getBaseSections()]) @permission(PERMS.SETTINGS) @@ -149,13 +149,15 @@ class Api(Iface): :return: list of `ConfigSection` """ - return [ConfigSection(section, data.name, data.description, data.long_desc) for - section, data in self.core.config.getPluginSections()] + return dict([(section, ConfigSection(section, + data.name, data.description, data.long_desc)) for + section, data in self.core.config.getPluginSections()]) def configureSection(self, section): data = self.core.config.config[section] sec = ConfigSection(section, data.name, data.description, data.long_desc) - sec.items = [ConfigItem(option, d.name, d.description, d.type, d.default, self.core.config.get(section, option)) + sec.items = [ConfigItem(option, d.name, d.description, + d.type, to_string(d.default), to_string(self.core.config.get(section, option))) for option, d in data.config.iteritems()] |