rtorrent-rpc-0.2.1.0: A library for communicating with RTorrent over its XML-RPC interface.

Copyright(c) Kai Lindholm, 2014
LicenseMIT
Maintainermegantti@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.RTorrent.Torrent

Contents

Description

For more info on actions, see Network.RTorrent.Action.

Synopsis

Documentation

newtype TorrentId Source

A newtype wrapper for torrent identifiers.

Constructors

TorrentId String 

Instances

Functions for handling torrents

start :: TorrentId -> TorrentAction Int Source

Start downloading a torrent.

close :: TorrentId -> TorrentAction Int Source

Close a torrent.

stop :: TorrentId -> TorrentAction Int Source

Stop a torrent.

erase :: TorrentId -> TorrentAction Int Source

Erase a torrent.

checkHash :: TorrentId -> TorrentAction Int Source

Initiate a hash check for a torrent.

getTorrent :: TorrentId -> TorrentAction TorrentInfo Source

Get a TorrentInfo for a torrent.

getTorrents :: AllAction TorrentId TorrentInfo Source

A command for getting torrent info for all torrents.

allTorrents :: (TorrentId -> TorrentAction a) -> AllAction TorrentId a Source

Execute a command on all torrents. For example the command

allTorrents (setTorrentPriority TorrentPriorityNormal)

will set the priority of all torrents to normal.

Functions for single variables

setTorrentPriority :: TorrentPriority -> TorrentId -> TorrentAction Int Source

Set the download priority of a torrent.

getTorrentPath :: TorrentId -> TorrentAction String Source

Get the absolute path to the torrent's directory or file.

getTorrentDir :: TorrentId -> TorrentAction String Source

Get the absolute path to the directory in which the torrent's directory or file resides.

getTorrentRatio :: TorrentId -> TorrentAction Int Source

Get the ratio (which is multiplied by a thousand)