couchpotato.core.downloaders.hadouken module¶
-
class
couchpotato.core.downloaders.hadouken.
Hadouken
[source]¶ Bases:
couchpotato.core._base.downloader.main.DownloaderBase
-
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']¶
-
-
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_magnet_link
(link, params)[source]¶ 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.
-
-
class
couchpotato.core.downloaders.hadouken.
JsonRpcClient
(url, auth_header=None)[source]¶ Bases:
object
-
class
couchpotato.core.downloaders.hadouken.
TorrentItem
[source]¶ Bases:
object
-
info_hash
¶
-
name
¶
-
save_path
¶
-
state
¶
-