flexget.plugins.clients.aria2 module#

class flexget.plugins.clients.aria2.JsonRpcClient(server, port, scheme, rpc_path, username=None, password=None, secret=None)[source]#

Bases: RpcClient

static _default_error_handle(code, message)[source]#
static _default_success_handle(response)[source]#
_get_req_params(method, params=None)[source]#
_post(method, params, on_success=<staticmethod(<function JsonRpcClient._default_success_handle>)>, on_fail=<staticmethod(<function JsonRpcClient._default_error_handle>)>)[source]#
add_torrent(torrent, options)[source]#
add_uri(uris, options)[source]#
get_global_stat()[source]#
ADDTORRENT_METHOD = 'aria2.addTorrent'#
ADDURI_METHOD = 'aria2.addUri'#
GETGLOBALSTAT_METHOD = 'aria2.getGlobalStat'#
RPC_ID = 'FLEXGET'#
RPC_VERSION = '2.0'#
class flexget.plugins.clients.aria2.OutputAria2[source]#

Bases: object

Simple Aria2 output.

Example:

aria2:
  path: ~/downloads/
add_entry(aria2, entry, config, task)[source]#

Add entry to Aria2.

Parameters:

aria2 (RpcClient)

on_task_output(task, config)[source]#
prepare_config(config)[source]#
schema = {'additionalProperties': False, 'properties': {'add_extension': {'default': 'no', 'oneOf': [{'type': 'string'}, {'type': 'boolean'}]}, 'filename': {'type': 'string'}, 'options': {'additionalProperties': {'oneOf': [{'type': 'string'}, {'type': 'number'}, {'type': 'boolean'}]}, 'type': 'object'}, 'password': {'default': '', 'type': 'string'}, 'path': {'type': 'string'}, 'port': {'default': 6800, 'type': 'integer'}, 'rpc_mode': {'default': 'xml', 'enum': ['xml', 'json'], 'type': 'string'}, 'rpc_path': {'default': 'rpc', 'type': 'string'}, 'scheme': {'default': 'http', 'type': 'string'}, 'secret': {'default': '', 'type': 'string'}, 'server': {'default': 'localhost', 'type': 'string'}, 'username': {'default': '', 'type': 'string'}}, 'required': ['path'], 'type': 'object'}#
class flexget.plugins.clients.aria2.RpcClient(server, port, scheme, rpc_path, username, password, secret)[source]#

Bases: object

add_torrent(torrent, options)[source]#
add_uri(uris, options)[source]#
class flexget.plugins.clients.aria2.XmlRpcClient(server, port, scheme, rpc_path, username=None, password=None, secret=None)[source]#

Bases: RpcClient

add_torrent(torrent, options)[source]#
add_uri(uris, options)[source]#
flexget.plugins.clients.aria2.register_plugin()[source]#