diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index e62fc557a..e369582d1 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -379,7 +379,9 @@ class WebApi(JSONComponent): self.sessionproxy = SessionProxy() def disable(self): - if not client.is_classicmode(): + if client.is_classicmode(): + component.get("Web.PluginManager").stop() + else: client.disconnect() client.set_disconnect_callback(None) @@ -387,7 +389,9 @@ class WebApi(JSONComponent): client.register_event_handler("PluginEnabledEvent", self._json.get_remote_methods) client.register_event_handler("PluginDisabledEvent", self._json.get_remote_methods) - if not client.is_classicmode(): + if client.is_classicmode(): + component.get("Web.PluginManager").start() + else: client.set_disconnect_callback(self._on_client_disconnect) if component.get("DelugeWeb").config["default_daemon"]: diff --git a/deluge/ui/web/pluginmanager.py b/deluge/ui/web/pluginmanager.py index 29204c79b..751407618 100644 --- a/deluge/ui/web/pluginmanager.py +++ b/deluge/ui/web/pluginmanager.py @@ -59,7 +59,7 @@ class PluginManager(PluginManagerBase, component.Component): try: plugin = component.get("WebPlugin." + name) except KeyError: - log.info("Plugin has no web ui") + log.debug("'%s' plugin contains no WebUI code, ignoring WebUI disable call.", name) return info = gather_info(plugin) @@ -81,7 +81,7 @@ class PluginManager(PluginManagerBase, component.Component): try: plugin = component.get("WebPlugin." + name) except KeyError: - log.info("Plugin has no web ui") + log.info("'%s' plugin contains no WebUI code, ignoring WebUI enable call.", name) return info = gather_info(plugin)