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.
Instance methods
added_on
Epoch seconds when the torrent was added.
Sourceamount_left
Bytes remaining to download.
Sourceauto_tmm
Whether automatic torrent management (auto-TMM) is enabled.
Sourceavailability
Fractional availability of the torrent's pieces (may exceed 1.0).
Sourcecategory
Category name (empty string when uncategorised).
Sourcecompleted
Amount of the selected data already completed, in bytes.
Sourcecompletion_on
Epoch seconds when the torrent completed downloading.
Sourcecontent_path
Absolute path of the content (root of a multi-file torrent, or the file
itself for a single-file torrent).
Sourcedl_limit
Per-torrent download limit, bytes/s (-1 = unlimited).
Sourcedlspeed
Current download speed, bytes/s.
Sourcedownload_path
Incomplete-files (download) path (qB 5.x).
Sourcedownloaded
Total bytes downloaded (all time for this torrent).
Sourcedownloaded_session
Bytes downloaded this session.
Sourceeta
Estimated time to completion, seconds (8640000 = infinity).
Sourcef_l_piece_prio
Whether the first and last pieces are prioritised.
Sourceforce_start
Whether force-start is enabled.
Sourcehash
Torrent hash (BitTorrent v1 infohash by default). Primary key of the
torrent across every endpoint.
Sourceinfohash_v1
BitTorrent v1 infohash (qB 5.x).
Sourceinfohash_v2
BitTorrent v2 infohash (qB 5.x; empty when the torrent has none).
Sourceis_private
Whether the torrent belongs to a private tracker (qB 5.x).
Sourcelast_activity
Epoch seconds of the last upload/download activity.
Sourcemagnet_uri
Magnet link for the torrent.
Sourcemax_ratio
Per-torrent maximum ratio limit.
Sourcemax_seeding_time
Per-torrent maximum seeding time, seconds.
Sourcenum_complete
Seeders in the swarm as reported by trackers.
Sourcenum_incomplete
Leechers in the swarm as reported by trackers.
Sourcenum_leechs
Currently connected leechers.
Sourcenum_seeds
Currently connected seeds.
Sourcepriority
Queue position (-1 when queueing is off or the torrent is seeding).
Sourceprogress
Download progress, 0.0โ1.0.
Sourceratio
Share ratio (capped around 9999).
Sourceratio_limit
Per-torrent ratio limit (-2 = use global, -1 = no limit).
Sourcereannounce
Seconds until the next tracker announce (qB 5.x, not always present).
Sourcesave_path
Save path for the torrent's data.
Sourceseeding_time_limit
Per-torrent seeding-time limit, minutes (-2 = global, -1 = none).
Sourceseen_complete
Epoch seconds the torrent was last seen complete in the swarm.
Sourceseq_dl
Whether sequential download is enabled.
Sourcesize
Selected size in bytes (excludes files set to "do not download").
Sourcestate
Current torrent state. Decoded tolerantly (unknown/null => nil).
Sourcesuper_seeding
Whether super-seeding is enabled.
Sourcetime_active
Seconds the torrent has been active.
Sourcetotal_size
Total size in bytes including unselected files.
Sourcetracker
First working tracker URL (empty when none is working).
Sourceup_limit
Per-torrent upload limit, bytes/s (-1 = unlimited).
Sourceuploaded
Total bytes uploaded (all time for this torrent).
Sourceuploaded_session
Bytes uploaded this session.
Sourceupspeed
Current upload speed, bytes/s.
Source