flexget.plugins.clients.rtorrent module#

class flexget.plugins.clients.rtorrent.HTTPDigestTransport(scheme, digest_auth, username, password, session, *args, **kwargs)[source]#

Bases: Transport

Transport that uses requests to support Digest authentication.

get_auth()[source]#
parse_response(response)[source]#
request(host, handler, request_body, verbose=False)[source]#
send_request(url, auth, data)[source]#
single_request(host, handler, request_body, verbose=0)[source]#
class flexget.plugins.clients.rtorrent.RTorrent(uri, username=None, password=None, digest_auth=None, session=None)[source]#

Bases: object

rTorrent API client.

_clean_fields(fields, reverse=False)[source]#
delete(info_hash)[source]#
get_directory()[source]#
load(raw_torrent, fields=None, custom_fields=None, start=False, mkdir=True)[source]#
move(info_hash, dst_path)[source]#
purge_torrent(info_hash)[source]#
start(info_hash)[source]#
stop(info_hash)[source]#
torrent(info_hash, fields=None, custom_fields=None)[source]#

Get the details of a torrent.

torrents(view='main', fields=None, custom_fields=None)[source]#
update(info_hash, fields, custom_fields=None)[source]#
default_fields = ('hash', 'name', 'up_total', 'down_total', 'down_rate', 'is_open', 'is_active', 'custom1', 'custom2', 'custom3', 'custom4', 'custom5', 'state', 'complete', 'bytes_done', 'down.rate', 'left_bytes', 'ratio', 'base_path', 'load_date', 'timestamp_finished')#
required_fields = ('hash', 'name', 'base_path')#
class flexget.plugins.clients.rtorrent.RTorrentInputPlugin[source]#

Bases: RTorrentPluginBase

on_task_input(task, config)[source]#
schema = {'additionalProperties': False, 'properties': {'custom_fields': {'items': {'type': 'string'}, 'type': 'array'}, 'digest_auth': {'default': False, 'type': 'boolean'}, 'fields': {'oneOf': [{'items': {'enum': ['hash', 'name', 'up_total', 'down_total', 'down_rate', 'is_open', 'is_active', 'custom1', 'custom2', 'custom3', 'custom4', 'custom5', 'state', 'complete', 'bytes_done', 'down.rate', 'left_bytes', 'ratio', 'base_path', 'load_date', 'timestamp_finished'], 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'enum': ['hash', 'name', 'up_total', 'down_total', 'down_rate', 'is_open', 'is_active', 'custom1', 'custom2', 'custom3', 'custom4', 'custom5', 'state', 'complete', 'bytes_done', 'down.rate', 'left_bytes', 'ratio', 'base_path', 'load_date', 'timestamp_finished'], 'title': 'single value', 'type': 'string'}]}, 'password': {'type': 'string'}, 'uri': {'type': 'string'}, 'username': {'type': 'string'}, 'view': {'default': 'main', 'type': 'string'}}, 'required': ['uri'], 'type': 'object'}#
class flexget.plugins.clients.rtorrent.RTorrentOutputPlugin[source]#

Bases: RTorrentPluginBase

_verify_load(client, info_hash)[source]#
add_entry(client, entry, options, start=True, mkdir=False, fast_resume=False)[source]#
delete_entry(client, entry)[source]#
on_task_abort(task, config)#

Make sure all temp files are cleaned up when entries are learned.

on_task_download(task, config)[source]#
on_task_learn(task, config)[source]#

Make sure all temp files are cleaned up when entries are learned.

on_task_output(task, config)[source]#
purge_entry(client, entry)[source]#
update_entry(client, entry, config)[source]#
schema = {'additionalProperties': False, 'properties': {'action': {'default': 'add', 'enum': ['update', 'delete', 'add', 'purge'], 'type': 'string'}, 'custom1': {'type': 'string'}, 'custom2': {'type': 'string'}, 'custom3': {'type': 'string'}, 'custom4': {'type': 'string'}, 'custom5': {'type': 'string'}, 'custom_fields': {'additionalProperties': {'type': 'string'}, 'type': 'object'}, 'digest_auth': {'default': False, 'type': 'boolean'}, 'fast_resume': {'default': False, 'type': 'boolean'}, 'message': {'type': 'string'}, 'mkdir': {'default': True, 'type': 'boolean'}, 'password': {'type': 'string'}, 'path': {'type': 'string'}, 'priority': {'type': 'string'}, 'start': {'default': True, 'type': 'boolean'}, 'uri': {'type': 'string'}, 'username': {'type': 'string'}}, 'required': ['uri'], 'type': 'object'}#
class flexget.plugins.clients.rtorrent.RTorrentPluginBase[source]#

Bases: object

_build_options(config, entry, entry_first=True)[source]#
priority_map = {'high': 3, 'low': 1, 'medium': 2, 'off': 0}#
class flexget.plugins.clients.rtorrent.SCGITransport(*args, **kwargs)[source]#

Bases: Transport

Public domain SCGITrannsport implementation from: JohnDoee/autotorrent.

single_request(host, handler, request_body, verbose=False)[source]#
class flexget.plugins.clients.rtorrent._Method(send, name)[source]#

Bases: object

flexget.plugins.clients.rtorrent.create_proxy(url)[source]#
flexget.plugins.clients.rtorrent.encode_header(key, value)[source]#
flexget.plugins.clients.rtorrent.encode_netstring(input)[source]#
flexget.plugins.clients.rtorrent.register_plugin()[source]#