From 67905b6f5bdee1cbbdc8fd30a4cefbe36a546d4b Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 28 Apr 2010 14:00:39 +0100 Subject: [PATCH] fix enabled plugins after connecting to a daemon --- deluge/ui/web/js/deluge-all/UI.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deluge/ui/web/js/deluge-all/UI.js b/deluge/ui/web/js/deluge-all/UI.js index 1f1ce9c38..af5c3f75b 100644 --- a/deluge/ui/web/js/deluge-all/UI.js +++ b/deluge/ui/web/js/deluge-all/UI.js @@ -156,6 +156,10 @@ deluge.ui = { this.running = setInterval(this.update, 2000); this.update(); } + deluge.client.web.get_plugins({ + success: this.onGotPlugins, + scope: this + }); }, /** @@ -166,6 +170,15 @@ deluge.ui = { this.stop(); }, + onGotPlugins: function(plugins) { + Ext.each(plugins.enabled_plugins, function(plugin) { + deluge.client.web.get_plugin_resources(plugin, { + success: this.onGotPluginResources, + scope: this + }); + }, this); + }, + onPluginEnabled: function(pluginName) { if (deluge.plugins[pluginName]) { deluge.plugins[pluginName].enable();