From f831cdce9a01b01d11a526d15e72a491869f910a Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 16 Sep 2009 09:38:46 +0000 Subject: [PATCH] add a method that returns both the available and enabled plugins to reduce the number of AJAX calls required --- deluge/ui/web/json_api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index d2f438bc5..363045713 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -781,6 +781,13 @@ class WebApi(JSONComponent): config[key] = config[key].encode("utf8") web_config[key] = config[key] + @export + def get_plugins(self): + return { + "enabled_plugins": component.get("Web.PluginManager").plugins.keys(), + "available_plugins": component.get("Web.PluginManager").available_plugins + } + @export def get_plugin_info(self, name): return component.get("Web.PluginManager").get_plugin_info(name)