Torrent

@Serializable
class Torrent(val addedOn: Long, val amountLeft: Long, val autoTmm: Boolean, val availability: Float, val category: String, val completed: Long, val completedOn: Long, val contentPath: String, val dlLimit: Long, val dlspeed: Long, val downloaded: Float, val downloadedSession: Float, val eta: Long, val firstLastPiecePriority: Boolean, val forceStart: Boolean, val hash: String, val lastActivity: Long, val magnetUri: String, val maxRatio: Float, val maxSeedingTime: Long, val name: String, val seedsInSwarm: Int, val leechersInSwarm: Int, val connectedLeechers: Int, val connectedSeeds: Int, val priority: Int, val progress: Float, val ratio: Float, val ratioLimit: Float, val savePath: String, val seedingTimeLimit: Long, val seenCompleted: Long, val sequentialDownload: Boolean, val size: Long, val state: Torrent.State, val superSeeding: Boolean, val tags: List<String>, val timeActive: Long, val seedingTime: Long, val totalSize: Long, val tracker: String, val uploadLimit: Long, val uploaded: Long, val uploadedSession: Long, val uploadSpeed: Long)

Constructors

Link copied to clipboard
constructor(addedOn: Long, amountLeft: Long, autoTmm: Boolean, availability: Float, category: String, completed: Long, completedOn: Long, contentPath: String, dlLimit: Long, dlspeed: Long, downloaded: Float, downloadedSession: Float, eta: Long, firstLastPiecePriority: Boolean, forceStart: Boolean, hash: String, lastActivity: Long, magnetUri: String, maxRatio: Float, maxSeedingTime: Long, name: String, seedsInSwarm: Int, leechersInSwarm: Int, connectedLeechers: Int, connectedSeeds: Int, priority: Int, progress: Float, ratio: Float, ratioLimit: Float, savePath: String, seedingTimeLimit: Long, seenCompleted: Long, sequentialDownload: Boolean, size: Long, state: Torrent.State, superSeeding: Boolean, tags: List<String>, timeActive: Long, seedingTime: Long, totalSize: Long, tracker: String, uploadLimit: Long, uploaded: Long, uploadedSession: Long, uploadSpeed: Long)

Types

Link copied to clipboard
@Serializable
enum State : Enum<Torrent.State>

Properties

Link copied to clipboard
@SerialName(value = "added_on")
val addedOn: Long

Time (Unix Epoch) when the torrent was added to the client

Link copied to clipboard
@SerialName(value = "amount_left")
val amountLeft: Long

Amount of data left to download (bytes)

Link copied to clipboard
@SerialName(value = "auto_tmm")
val autoTmm: Boolean

Whether this torrent is managed by Automatic Torrent Management

Link copied to clipboard

Percentage of file pieces currently available

Link copied to clipboard

Category of the torrent

Link copied to clipboard

Amount of transfer data completed (bytes)

Link copied to clipboard
@SerialName(value = "completion_on")
val completedOn: Long

Time (Unix Epoch) when the torrent completed

Link copied to clipboard
@SerialName(value = "num_leechs")
val connectedLeechers: Int

Number of leechers connected to

Link copied to clipboard
@SerialName(value = "num_seeds")
val connectedSeeds: Int

Number of seeds connected to

Link copied to clipboard
@SerialName(value = "content_path")
val contentPath: String

Absolute path of torrent content (root path for multifile torrents, absolute file path for singlefile torrents)

Link copied to clipboard
@SerialName(value = "dl_limit")
val dlLimit: Long

Torrent download speed limit (bytes/s). -1 if unlimited.

Link copied to clipboard

Torrent download speed (bytes/s)

Link copied to clipboard

Amount of data downloaded

Link copied to clipboard
@SerialName(value = "downloaded_session")
val downloadedSession: Float

Amount of data downloaded this session

Link copied to clipboard
val eta: Long

Torrent ETA (seconds)

Link copied to clipboard
@SerialName(value = "f_l_piece_prio")
val firstLastPiecePriority: Boolean

True if first last piece are prioritized

Link copied to clipboard
@SerialName(value = "force_start")
val forceStart: Boolean

True if force start is enabled for this torrent

Link copied to clipboard

Torrent hash

Link copied to clipboard
@SerialName(value = "last_activity")
val lastActivity: Long

Last time (Unix Epoch) when a chunk was downloaded/uploaded

Link copied to clipboard
@SerialName(value = "num_incomplete")
val leechersInSwarm: Int

Number of leechers in the swarm

Link copied to clipboard
@SerialName(value = "magnet_uri")
val magnetUri: String

Magnet URI corresponding to this torrent

Link copied to clipboard
@SerialName(value = "max_ratio")
val maxRatio: Float

Maximum share ratio until torrent is stopped from seeding/uploading

Link copied to clipboard
@SerialName(value = "max_seeding_time")
val maxSeedingTime: Long

Maximum seeding time (seconds) until torrent is stopped from seeding

Link copied to clipboard

Torrent name

Link copied to clipboard

Torrent priority. Returns -1 if queuing is disabled or torrent is in seed mode

Link copied to clipboard

Torrent progress (percentage/100)

Link copied to clipboard

Torrent share ratio. Max ratio value: 9999.

Link copied to clipboard
@SerialName(value = "ratio_limit")
val ratioLimit: Float
Link copied to clipboard
@SerialName(value = "save_path")
val savePath: String

Path where this torrent's data is stored

Link copied to clipboard
@SerialName(value = "seeding_time")
val seedingTime: Long

Torrent elapsed time while complete (seconds)

Link copied to clipboard
@SerialName(value = "seeding_time_limit")
val seedingTimeLimit: Long
Link copied to clipboard
@SerialName(value = "num_complete")
val seedsInSwarm: Int

Number of seeds in the swarm

Link copied to clipboard
@SerialName(value = "seen_complete")
val seenCompleted: Long

Time (Unix Epoch) when this torrent was last seen complete

Link copied to clipboard
@SerialName(value = "seq_dl")
val sequentialDownload: Boolean

True if sequential download is enabled

Link copied to clipboard
val size: Long

Total size (bytes) of files selected for download

Link copied to clipboard

Torrent state.

Link copied to clipboard
@SerialName(value = "super_seeding")
val superSeeding: Boolean

True if super seeding is enabled

Link copied to clipboard
@Serializable(with = CommaListSerializer::class)
val tags: List<String>

Tag list of the torrent

Link copied to clipboard
@SerialName(value = "time_active")
val timeActive: Long

Total active time (seconds)

Link copied to clipboard
@SerialName(value = "total_size")
val totalSize: Long

Total size (bytes) of all file in this torrent (including unselected ones)

Link copied to clipboard

The first tracker with working status. Returns empty string if no tracker is working.

Link copied to clipboard

Amount of data uploaded

Link copied to clipboard
@SerialName(value = "uploaded_session")
val uploadedSession: Long

Amount of data uploaded this session

Link copied to clipboard
@SerialName(value = "up_limit")
val uploadLimit: Long

Torrent upload speed limit (bytes/s). -1 if unlimited.

Link copied to clipboard
@SerialName(value = "upspeed")
val uploadSpeed: Long

Torrent upload speed (bytes/s)