diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 19:42:27 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 19:42:27 +0200 |
commit | 4612984d4bd929f814a56118620faa02cbf74577 (patch) | |
tree | e3c2a158e5dfcee061f18e6edf2975c184f8d941 /module/plugins | |
parent | new DLC plugins, adapted irc interface - needs testing (diff) | |
download | pyload-4612984d4bd929f814a56118620faa02cbf74577.tar.xz |
fixed config on webif + show description
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/PluginManager.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py index f583f91de..17405ce8b 100644 --- a/module/plugins/PluginManager.py +++ b/module/plugins/PluginManager.py @@ -73,6 +73,7 @@ class PluginManager(): self.rePattern = re.compile(r'__pattern__.*=.*r("|\')([^"\']+)') self.reVersion = re.compile(r'__version__.*=.*("|\')([0-9.]+)') self.reConfig = re.compile(r'__config__.*=.*\[([^\]]+)', re.MULTILINE) + self.reDesc = re.compile(r'__description__.?=.?("|"""|\')([^"\']+)') self.crypterPlugins = self.parse(_("Crypter"), "crypter", pattern=True) self.containerPlugins = self.parse(_("Container"), "container", pattern=True) @@ -167,6 +168,12 @@ class PluginManager(): if config: config = literal_eval(config[0].strip().replace("\n", "").replace("\r", "")) + desc = self.reDesc.findall(content) + if desc: + desc = desc[0][1] + else: + desc = "" + if type(config[0]) == tuple: config = [list(x) for x in config] else: @@ -175,8 +182,7 @@ class PluginManager(): if folder == "hooks": config.append(["load", "bool", "Load on startup", True if name not in NO_AUTOLOAD else False]) - for item in config: - self.core.config.addPluginConfig([name] + item) + self.core.config.addPluginConfig(name, config, desc) if not home: temp = self.parse(typ, folder, create, pattern, plugins) |