couchpotato.core.downloaders.hadouken module

class couchpotato.core.downloaders.hadouken.Hadouken[source]

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

connect()[source]
download(data=None, media=None, filedata=None)[source]

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

getAllDownloadStatus(ids)[source]

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
hadouken_api = None
pause(release_download, pause=True)[source]

Pauses or resumes the torrent specified by the ID field in release_download.

Keyword arguments: release_download – The CouchPotato release_download to pause/resume. pause – Boolean indicating whether to pause or resume.

processComplete(release_download, delete_files=False)[source]

Removes the completed torrent from Hadouken and optionally removes the data associated with it.

Keyword arguments: release_download – The CouchPotato release_download to remove. delete_files: Boolean indicating whether to remove the associated data.

protocol = ['torrent', 'torrent_magnet']
removeFailed(release_download)[source]

Removes a failed torrent and also remove the data associated with it.

Keyword arguments: release_download – The CouchPotato release_download to remove.

test()[source]

Tests the given host:port and API key

class couchpotato.core.downloaders.hadouken.HadoukenAPI(rpc_client)[source]

Bases: object

add_file(data, params)[source]

Add a file to Hadouken with the specified parameters.

Keyword arguments: filedata – The binary torrent data. torrent_params – Additional parameters for the file.

Add a magnet link to Hadouken with the specified parameters.

Keyword arguments: magnetLink – The magnet link to send. torrent_params – Additional parameters for the magnet link.

get_by_hash_list(infoHashList)[source]

Gets a list of torrents filtered by the given info hash list.

Keyword arguments: infoHashList – A list of info hashes.

get_files_by_hash(infoHash)[source]

Gets a list of files for the torrent identified by the given info hash.

Keyword arguments: infoHash – The info hash of the torrent to return files for.

get_version()[source]

Gets the version, commitish and build date of Hadouken.

pause(infoHash, pause)[source]

Pauses/unpauses the torrent identified by the given info hash.

Keyword arguments: infoHash – The info hash of the torrent to operate on. pause – If true, pauses the torrent. Otherwise resumes.

remove(infoHash, remove_data=False)[source]

Removes the torrent identified by the given info hash and optionally removes the data as well.

Keyword arguments: infoHash – The info hash of the torrent to remove. remove_data – If true, removes the data associated with the torrent.

class couchpotato.core.downloaders.hadouken.HadoukenAPIv4[source]

Bases: object

add_file(data, params)[source]
get_by_hash_list(infoHashList)[source]
get_files_by_hash(infoHash)[source]
get_version()[source]
pause(infoHash, pause)[source]
remove(infoHash, remove_data=False)[source]
class couchpotato.core.downloaders.hadouken.HadoukenAPIv5(rpc_client)[source]

Bases: couchpotato.core.downloaders.hadouken.HadoukenAPI

add_file(data, params)[source]
get_by_hash_list(infoHashList)[source]
get_files_by_hash(infoHash)[source]
get_version()[source]
pause(infoHash, pause)[source]
remove(infoHash, remove_data=False)[source]
class couchpotato.core.downloaders.hadouken.JsonRpcClient(url, auth_header=None)[source]

Bases: object

invoke(method, params)[source]
class couchpotato.core.downloaders.hadouken.TorrentItem[source]

Bases: object

get_seed_ratio()[source]

Returns the seed ratio for a given torrent.

get_status()[source]

Returns the CouchPotato status for a given torrent.

info_hash
name
save_path
state
class couchpotato.core.downloaders.hadouken.TorrentItemv4(obj)[source]

Bases: couchpotato.core.downloaders.hadouken.TorrentItem

get_seed_ratio()[source]
get_status()[source]
info_hash()[source]
name()[source]
save_path()[source]
state()[source]
class couchpotato.core.downloaders.hadouken.TorrentItemv5(obj)[source]

Bases: couchpotato.core.downloaders.hadouken.TorrentItem

get_seed_ratio()[source]
get_status()[source]
info_hash()[source]
name()[source]
save_path()[source]
state()[source]