couchpotato.core.downloaders.deluge module

class couchpotato.core.downloaders.deluge.Deluge[source]

Bases: couchpotato.core._base.downloader.main.DownloaderBase

connect(reconnect=False)

Connect to the delugeRPC, re-use connection when already available :param reconnect: force reconnect :return: DelugeRPC instance

download(data=None, media=None, filedata=None)

Send a torrent/nzb file to the downloader

Parameters:
  • data – dict returned from provider Contains the release information
  • media – media dict with information Used for creating the filename when possible
  • filedata – downloaded torrent/nzb filedata The file gets downloaded in the searcher and send to this function This is done to have failed checking before using the downloader, so the downloader doesn’t need to worry about that
Returns:

boolean One faile returns false, but the downloaded should log his own errors

drpc = None
getAllDownloadStatus(ids)

Get status of all active downloads

Parameters:ids – list of (mixed) downloader ids Used to match the releases for this downloader as there could be other downloaders active that it should ignore
Returns:list of releases
log = <couchpotato.core.logger.CPLog object>
pause(release_download, pause=True)
processComplete(release_download, delete_files=False)
protocol = ['torrent', 'torrent_magnet']
removeFailed(release_download)
test()

Check if connection works :return: bool

class couchpotato.core.downloaders.deluge.DelugeRPC(host='localhost', port=58846, username=None, password=None)[source]

Bases: object

add_torrent_file(filename, torrent, options)
add_torrent_magnet(torrent, options)
client = None
connect()
disconnect()
get_alltorrents(ids)
host = 'localhost'
password = None
pause_torrent(torrent_ids)
port = 58846
remove_torrent(torrent_id, remove_local_data)
resume_torrent(torrent_ids)
test()
username = None