DelugeRPC is a protocol used for daemon/client communication. There are four types of messages involved in the protocol: RPC Request, RPC Response, RPC Error and Event. All messages are zlib compressed rencoded strings and their data formats are detailed below.
This message is created and sent by the client to the server requesting that a remote method be called. Multiple requests can be bundled in a list.
[[request_id, method, [args], {kwargs}], ...]
This message is created and sent in response to a RPC Request from a client. It will hold the return value of the requested method call. In the case of an error, a RPC Error message will be sent instead.
[message_type, request_id, [return_value]]
This message is created in response to an error generated while processing a RPC Request and will serve as a replacement for a RPC Response message.
[message_type, request_id, exception_type, exception_msg, traceback]
This message is created by the daemon and sent to the clients without being in response to a RPC Request. Events are generally sent for changes in the daemon’s state that the clients need to be made aware of.
[message_type, event_name, data]
Methods available in core
RPC Exported Function (Auth Level: 5)
Adds a torrent file to the session.
| Parameters: |
|
|---|---|
| Returns: | the torrent_id as a str or None |
| Return type: | string |
RPC Exported Function (Auth Level: 5)
Adds a torrent from a magnet link.
| Parameters: |
|
|---|---|
| Returns: | the torrent_id |
| Return type: | string |
RPC Exported Function (Auth Level: 5)
Adds a torrent from a url. Deluge will attempt to fetch the torrent from url prior to adding it to the session.
| Parameters: |
|
|---|---|
| Returns: | a Deferred which returns the torrent_id as a str or None |
RPC Exported Function (Auth Level: 5)
Forces a data recheck on torrent_ids
RPC Exported Function (Auth Level: 5)
Returns a list of plugins available in the core
RPC Exported Function (Auth Level: 5)
Returns a dictionary of the session’s cache status.
| Returns: | the cache status |
|---|---|
| Return type: | dict |
RPC Exported Function (Auth Level: 5)
Get all the preferences as a dictionary
RPC Exported Function (Auth Level: 5)
Get the config value for key
RPC Exported Function (Auth Level: 5)
Get the config values for the entered keys
RPC Exported Function (Auth Level: 5)
Returns the number of dht nodes
RPC Exported Function (Auth Level: 5)
Returns the payload download rate
RPC Exported Function (Auth Level: 5)
Returns a list of enabled plugins in the core
RPC Exported Function (Auth Level: 5)
returns {field: [(value,count)] } for use in sidebar(s)
RPC Exported Function (Auth Level: 5)
Returns the number of free bytes at path
| Parameter: | path (string) – the path to check free space at |
|---|---|
| Returns: | the number of free bytes at path |
| Return type: | int |
| Raises InvalidPathError: | |
| if the path is invalid | |
RPC Exported Function (Auth Level: 5)
Returns True if we have established incoming connections
RPC Exported Function (Auth Level: 5)
Returns the active listen port
RPC Exported Function (Auth Level: 5)
Returns the current number of connections
RPC Exported Function (Auth Level: 5)
RPC Exported Function (Auth Level: 5)
Returns a list of torrent_ids in the session.
RPC Exported Function (Auth Level: 5)
Gets the session status values for ‘keys’, these keys are taking from libtorrent’s session status.
| Parameter: | keys (list) – the keys for which we want values |
|---|---|
| Returns: | a dictionary of {key: value, ...} |
| Return type: | dict |
RPC Exported Function (Auth Level: 5)
Deprecated: please use get_session_status()
RPC Exported Function (Auth Level: 5)
returns all torrents , optionally filtered by filter_dict.
RPC Exported Function (Auth Level: 5)
Returns the payload upload rate
RPC Exported Function (Auth Level: 5)
Pause all torrents in the session
RPC Exported Function (Auth Level: 5)
Removes a torrent from the session.
| Parameters: |
|
|---|---|
| Returns: | True if removed successfully |
| Return type: | bool |
| Raises InvalidTorrentError: | |
if the torrent_id does not exist in the session |
|
RPC Exported Function (Auth Level: 5)
Rename files in torrent_id. Since this is an asynchronous operation by libtorrent, watch for the TorrentFileRenamedEvent to know when the files have been renamed.
| Parameters: |
|
|---|---|
| Raises InvalidTorrentError: | |
if torrent_id is invalid |
|
RPC Exported Function (Auth Level: 5)
Renames the ‘folder’ to ‘new_folder’ in ‘torrent_id’. Watch for the TorrentFolderRenamedEvent which is emitted when the folder has been renamed successfully.
| Parameters: |
|
|---|---|
| Raises InvalidTorrentError: | |
if the torrent_id is invalid |
|
RPC Exported Function (Auth Level: 5)
Rescans the plugin folders for new plugins
RPC Exported Function (Auth Level: 5)
Resume all torrents in the session
RPC Exported Function (Auth Level: 5)
Set the config with values from dictionary
RPC Exported Function (Auth Level: 5)
Sets the auto managed flag for queueing purposes
RPC Exported Function (Auth Level: 5)
Sets a torrents file priorities
RPC Exported Function (Auth Level: 5)
Sets a torrents max number of connections
RPC Exported Function (Auth Level: 5)
Sets a torrents max download speed
RPC Exported Function (Auth Level: 5)
Sets a torrents max number of upload slots
RPC Exported Function (Auth Level: 5)
Sets a torrents max upload speed
RPC Exported Function (Auth Level: 5)
Sets the torrent to be moved when completed
RPC Exported Function (Auth Level: 5)
Sets the path for the torrent to be moved when completed
RPC Exported Function (Auth Level: 5)
Sets the torrent options for torrent_ids
RPC Exported Function (Auth Level: 5)
Sets a higher priority to the first and last pieces
RPC Exported Function (Auth Level: 5)
Sets the torrent to be removed at ‘stop_ratio’
RPC Exported Function (Auth Level: 5)
Sets the torrent to stop at ‘stop_ratio’
RPC Exported Function (Auth Level: 5)
Sets the ratio when to stop a torrent if ‘stop_at_ratio’ is set
RPC Exported Function (Auth Level: 5)
Sets a torrents tracker list. trackers will be [{“url”, “tier”}]
RPC Exported Function (Auth Level: 5)
Checks if the active port is open
| Returns: | True if the port is open, False if not |
|---|---|
| Return type: | bool |
RPC Exported Function (Auth Level: 5)
Methods available in daemon
RPC Exported Function (Auth Level: 5)
Returns a list of the exported methods.
RPC Exported Function (Auth Level: 5)
Returns some info from the daemon.
| Returns: | str, the version number |
|---|