Skip to content

TorrentInfo

adborbas edited this page Jun 5, 2022 · 1 revision

TorrentInfo

Torrent info.

public struct TorrentInfo: Codable, Equatable 

Inheritance

Codable, Equatable

Initializers

init(from:)

public init(from decoder: Decoder) throws 

Properties

name

Torrent name.

public let name: String

state

Torrent state.

public let state: TorrentState

hash

Torrent hash.

public let hash: String

category

Category of the torrent.

public let category: String

tags

Comma-concatenated tag list of the torrent.

public let tags: [String]

progress

Torrent progress (percentage/100).

public let progress: Float

addedDate

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

public let addedDate: Date

completionDate

Time (Unix Epoch) when the torrent completed.

public let completionDate: Date

amountLeft

Amount of data left to download in bytes.

public let amountLeft: Int64

downloaded

Amount of data downloaded in bytes.

public let downloaded: Int64

uploaded

Amount of data uploaded in bytes.

public let uploaded: Int64

eta

Torrent ETA in seconds.

public let eta: Int

ratio

Torrent share ratio. Max ratio value:​ 9999.

public let ratio: Float

size

Total size of files selected for download in bytes.

public let size: Int64

totalSize

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

public let totalSize: Int64

uploadSpeed

Torrent upload speed in bytes/s.

public let uploadSpeed: Int64

downloadSpeed

Torrent download speed in bytes/s.

public let downloadSpeed: Int64