mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 23:18:40 +00:00
add enable/disable methods to the JSON component
remove the empty enable/disable plugin methods from the web api
This commit is contained in:
parent
da5697490d
commit
aa4202b9ed
1 changed files with 11 additions and 10 deletions
|
@ -138,6 +138,16 @@ class JSON(resource.Resource, component.Component):
|
||||||
_d.addCallback(on_client_connected)
|
_d.addCallback(on_client_connected)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
def disable(self):
|
||||||
|
client.disconnect()
|
||||||
|
|
||||||
|
def enable(self):
|
||||||
|
if component.get("DelugeWeb").config["deluge_daemon"]:
|
||||||
|
# Sort out getting the default daemon here
|
||||||
|
default = component.get("DelugeWeb").config["deluge_daemon"]
|
||||||
|
host = component.get("Web").get_host(default)
|
||||||
|
self.connect()
|
||||||
|
|
||||||
def _on_client_disconnect(self, *args):
|
def _on_client_disconnect(self, *args):
|
||||||
component.get("Web.PluginManager").stop()
|
component.get("Web.PluginManager").stop()
|
||||||
|
|
||||||
|
@ -711,12 +721,3 @@ class WebApi(JSONComponent):
|
||||||
@export
|
@export
|
||||||
def get_plugin_info(self, name):
|
def get_plugin_info(self, name):
|
||||||
return component.get("Web.PluginManager").get_plugin_info(name)
|
return component.get("Web.PluginManager").get_plugin_info(name)
|
||||||
|
|
||||||
@export
|
|
||||||
def enable_plugin(self, name):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@export
|
|
||||||
def disable_plugin(self, name):
|
|
||||||
pass
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue