flexget.plugins.clients.deluge module#

class flexget.plugins.clients.deluge.DelugePlugin[source]#

Bases: object

Base class for deluge plugins, contains settings and methods for connecting to a deluge daemon.

static get_localhost_auth(config_path=None)[source]#
on_task_start(task, config)[source]#

Fail early if we can’t import/configure the deluge client.

prepare_config(config)[source]#
setup_client(config)[source]#
class flexget.plugins.clients.deluge.InputDeluge[source]#

Bases: DelugePlugin

Create entries for torrents in the deluge session.

generate_entries(client, config)[source]#
on_task_input(task, config)[source]#

Generate and return a list of entries from the deluge daemon.

on_task_start(task, config)[source]#

Fail early if we can’t import/configure the deluge client.

prepare_config(config)[source]#
schema = {'anyOf': [{'type': 'boolean'}, {'additionalProperties': False, 'properties': {'config_path': {'format': 'path', 'type': 'string'}, 'filter': {'additionalProperties': False, 'properties': {'label': {'type': 'string'}, 'state': {'enum': ['active', 'downloading', 'seeding', 'queued', 'paused'], 'type': 'string'}}, 'type': 'object'}, 'host': {'type': 'string'}, 'password': {'type': 'string'}, 'port': {'type': 'integer'}, 'username': {'type': 'string'}}, 'type': 'object'}]}#
settings_map = {'completed_time': ('deluge_date_completed', <function InputDeluge.<lambda>>), 'files': ('content_files', <function InputDeluge.<lambda>>), 'hash': 'torrent_info_hash', 'name': 'title', 'num_peers': 'torrent_peers', 'num_seeds': 'torrent_seeds', 'time_added': ('deluge_date_added', <function from_timestamp>), 'total_size': 'content_size'}#
class flexget.plugins.clients.deluge.OutputDeluge[source]#

Bases: DelugePlugin

Add the torrents directly to deluge, supporting custom save paths.

_format_label(label)[source]#

Make a string compliant with deluge label naming rules.

_set_torrent_options(client, torrent_id, entry, opts)[source]#

Get called when a torrent was added to the daemon.

on_task_abort(task, config)[source]#

Make sure normal cleanup tasks still happen on abort.

on_task_download(task, config)[source]#

Call download plugin to generate the temp files we will load into deluge then verify they are valid torrents.

on_task_learn(task, config)[source]#

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

on_task_output(task, config)[source]#

Add torrents to deluge at exit.

prepare_config(config)[source]#
schema = {'anyOf': [{'type': 'boolean'}, {'additionalProperties': False, 'properties': {'action': {'enum': ['add', 'remove', 'purge', 'pause', 'resume'], 'type': 'string'}, 'add_paused': {'type': 'boolean'}, 'auto_managed': {'type': 'boolean'}, 'compact': {'type': 'boolean'}, 'config_path': {'format': 'path', 'type': 'string'}, 'container_directory': {'type': 'string'}, 'content_filename': {'type': 'string'}, 'enabled': {'type': 'boolean'}, 'force_recheck': {'type': 'boolean'}, 'hide_sparse_files': {'type': 'boolean'}, 'host': {'type': 'string'}, 'keep_subs': {'type': 'boolean'}, 'label': {'type': 'string'}, 'magnetization_timeout': {'type': 'integer'}, 'main_file_only': {'type': 'boolean'}, 'main_file_ratio': {'type': 'number'}, 'max_connections': {'type': 'integer'}, 'max_down_speed': {'type': 'number'}, 'max_up_slots': {'type': 'integer'}, 'max_up_speed': {'type': 'number'}, 'move_completed_path': {'type': 'string'}, 'password': {'type': 'string'}, 'path': {'type': 'string'}, 'port': {'type': 'integer'}, 'queue_to_top': {'type': 'boolean'}, 'ratio': {'type': 'number'}, 'remove_at_ratio': {'type': 'boolean'}, 'username': {'type': 'string'}}, 'type': 'object'}]}#
flexget.plugins.clients.deluge.register_plugin()[source]#