couchpotato.core.downloaders.utorrent module

class couchpotato.core.downloaders.utorrent.uTorrent[source]

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

connect()
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

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
pause(release_download, pause=True)
processComplete(release_download, delete_files=False)
protocol = ['torrent', 'torrent_magnet']
removeFailed(release_download)
removeReadOnly(files)
status_flags = {'PAUSED': 32, 'CHECKING': 2, 'CHECKED': 8, 'ERROR': 16, 'STARTED': 1, 'LOADED': 128, 'CHECK-START': 4, 'QUEUED': 64}
test()

Check if connection works :return: bool

utorrent_api = None
class couchpotato.core.downloaders.utorrent.uTorrentAPI(host='localhost', port=8000, username=None, password=None)[source]

Bases: object

add_torrent_file(filename, filedata, add_folder=False)
add_torrent_uri(filename, torrent, add_folder=False)
get_build()
get_files(hash)
get_settings()
get_status()
get_token()
pause_torrent(hash, pause=True)
remove_torrent(hash, remove_data=False)
set_settings(settings_dict=None)
set_torrent(hash, params)
stop_torrent(hash)