mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-16 15:28:46 +00:00
add a list_methods method so a javascript json-client can be built for
the webui
This commit is contained in:
parent
b3b856bcca
commit
c6439e5a22
1 changed files with 14 additions and 0 deletions
|
@ -199,6 +199,20 @@ class DelugeRPCProtocol(Protocol):
|
||||||
self.transport.loseConnection()
|
self.transport.loseConnection()
|
||||||
finally:
|
finally:
|
||||||
return
|
return
|
||||||
|
elif method == "daemon.list_methods":
|
||||||
|
# This is a method used to populate the json-rpc interface in the
|
||||||
|
# webui
|
||||||
|
try:
|
||||||
|
ret = self.factory.methods.keys()
|
||||||
|
except Exception, e:
|
||||||
|
# Send error packet here
|
||||||
|
log.exception(e)
|
||||||
|
else:
|
||||||
|
self.sendData((RPC_RESPONSE, request_id, (ret)))
|
||||||
|
if not ret:
|
||||||
|
self.transport.loseConnection()
|
||||||
|
finally:
|
||||||
|
return
|
||||||
|
|
||||||
if method in self.factory.methods:
|
if method in self.factory.methods:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue