summaryrefslogtreecommitdiffstats
path: root/pyload/webui/app
diff options
context:
space:
mode:
authorGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-10 19:40:33 +0200
committerGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-10 19:40:33 +0200
commit0b040f33c65acb50a1e1cc0970365237e7e4ee69 (patch)
treeaebb4cf7abae23861cb45bf543ef269c1857b50e /pyload/webui/app
parentshowing plugins nicer in settings -> "xxx (Addon)" instead "xxx_addon" (diff)
downloadpyload-0b040f33c65acb50a1e1cc0970365237e7e4ee69.tar.xz
moved the config-nicer from config-parser to webui-app
recreateing of plugin.conf no more needed
Diffstat (limited to 'pyload/webui/app')
-rw-r--r--pyload/webui/app/pyloadweb.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/pyload/webui/app/pyloadweb.py b/pyload/webui/app/pyloadweb.py
index d71d0d306..8bf8060d4 100644
--- a/pyload/webui/app/pyloadweb.py
+++ b/pyload/webui/app/pyloadweb.py
@@ -239,6 +239,8 @@ def get_download(path):
return static_file(fs_encode(path), fs_encode(root))
+__TYPES = ("account", "addon", "container", "crypter", "extractor", "hook", "hoster", "internal", "ocr")
+__TYPE_REPLACES = ( ('_account', ' (Account)'), ('_addon', ' (Addon)'), ('_container', ''), ('_crypter', ' (Crypter)'), ('_extractor', ''), ('_hook', ' (Hook)'), ('_hoster', ' (Hoster)'))
@route('/settings')
@login_required('SETTINGS')
@@ -253,7 +255,17 @@ def config():
conf_menu.append((entry, conf[entry].description))
for entry in sorted(plugin.keys()):
- plugin_menu.append((entry, plugin[entry].description))
+ desc = plugin[entry].description
+ name, none, type = desc.partition("_")
+ if type in __TYPES:
+ if len([a for a,b in plugin.iteritems() if b.description.startswith(name+"_")]) > 1:
+ for search, repl in __TYPE_REPLACES:
+ if desc.endswith(search):
+ desc = desc.replace(search, repl)
+ break
+ else:
+ desc = name
+ plugin_menu.append((entry, desc))
accs = PYLOAD.getAccounts(False)