class

QBittorrent::Model::TorrentInfo

Inherits JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

A single torrent as returned by torrents/info (see ext/api-map.md ยง3).

This model is also the value type of the torrents object in sync/maindata, where qBittorrent sends partial TorrentInfo deltas carrying only the fields that changed since the last response id. To make that reuse safe, every field here is nilable โ€” any subset of keys must parse without raising โ€” and JSON::Serializable::Unmapped is included so keys not modelled here (forward drift on newer builds) are preserved in #json_unmapped rather than rejected.

Byte counts, epoch timestamps and durations are Int64? (torrents can be larger than 2 GiB and epoch seconds are fine in Int32 today but Int64 is future-proof); fractional fields (progress, ratio, availability, the ratio limits) are Float64?. state decodes through the tolerant TorrentStateConverter, so an unknown/null state becomes nil instead of raising.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

added_on

Epoch seconds when the torrent was added.

Source
amount_left

Bytes remaining to download.

Source
auto_tmm

Whether automatic torrent management (auto-TMM) is enabled.

Source
availability

Fractional availability of the torrent's pieces (may exceed 1.0).

Source
category

Category name (empty string when uncategorised).

Source
completed

Amount of the selected data already completed, in bytes.

Source
completion_on

Epoch seconds when the torrent completed downloading.

Source
content_path

Absolute path of the content (root of a multi-file torrent, or the file itself for a single-file torrent).

Source
dl_limit

Per-torrent download limit, bytes/s (-1 = unlimited).

Source
dlspeed

Current download speed, bytes/s.

Source
download_path

Incomplete-files (download) path (qB 5.x).

Source
downloaded

Total bytes downloaded (all time for this torrent).

Source
downloaded_session

Bytes downloaded this session.

Source
eta

Estimated time to completion, seconds (8640000 = infinity).

Source
f_l_piece_prio

Whether the first and last pieces are prioritised.

Source
force_start

Whether force-start is enabled.

Source
hash

Torrent hash (BitTorrent v1 infohash by default). Primary key of the torrent across every endpoint.

Source
infohash_v1

BitTorrent v1 infohash (qB 5.x).

Source
infohash_v2

BitTorrent v2 infohash (qB 5.x; empty when the torrent has none).

Source
is_private

Whether the torrent belongs to a private tracker (qB 5.x).

Source
last_activity

Epoch seconds of the last upload/download activity.

Source
magnet_uri

Magnet link for the torrent.

Source
max_ratio

Per-torrent maximum ratio limit.

Source
max_seeding_time

Per-torrent maximum seeding time, seconds.

Source
name

Torrent display name.

Source
num_complete

Seeders in the swarm as reported by trackers.

Source
num_incomplete

Leechers in the swarm as reported by trackers.

Source
num_leechs

Currently connected leechers.

Source
num_seeds

Currently connected seeds.

Source
priority

Queue position (-1 when queueing is off or the torrent is seeding).

Source
progress

Download progress, 0.0โ€“1.0.

Source
ratio

Share ratio (capped around 9999).

Source
ratio_limit

Per-torrent ratio limit (-2 = use global, -1 = no limit).

Source
reannounce

Seconds until the next tracker announce (qB 5.x, not always present).

Source
save_path

Save path for the torrent's data.

Source
seeding_time

Seconds spent seeding.

Source
seeding_time_limit

Per-torrent seeding-time limit, minutes (-2 = global, -1 = none).

Source
seen_complete

Epoch seconds the torrent was last seen complete in the swarm.

Source
seq_dl

Whether sequential download is enabled.

Source
size

Selected size in bytes (excludes files set to "do not download").

Source
state

Current torrent state. Decoded tolerantly (unknown/null => nil).

Source
super_seeding

Whether super-seeding is enabled.

Source
tags

Comma-separated list of tags.

Source
time_active

Seconds the torrent has been active.

Source
total_size

Total size in bytes including unselected files.

Source
tracker

First working tracker URL (empty when none is working).

Source
up_limit

Per-torrent upload limit, bytes/s (-1 = unlimited).

Source
uploaded

Total bytes uploaded (all time for this torrent).

Source
uploaded_session

Bytes uploaded this session.

Source
upspeed

Current upload speed, bytes/s.

Source