Table of Contents

Class Torrent

Namespace
TorBoxSDK.Models.Torrents
Assembly
TorBoxSDK.dll

Represents a torrent download item returned by the TorBox API.

public sealed record Torrent : IEquatable<Torrent>
Inheritance
Torrent
Implements
Inherited Members

Properties

Active

Gets a value indicating whether the torrent is currently active.

[JsonPropertyName("active")]
public bool Active { get; init; }

Property Value

bool

AllowZipped

Gets a value indicating whether zipped downloads are allowed for this torrent.

[JsonPropertyName("allow_zipped")]
public bool AllowZipped { get; init; }

Property Value

bool

AlternativeHashes

Gets the list of alternative hashes for this torrent.

[JsonPropertyName("alternative_hashes")]
public IReadOnlyList<string> AlternativeHashes { get; init; }

Property Value

IReadOnlyList<string>

AuthId

Gets the authentication identifier of the user who owns this torrent, or null if not available.

[JsonPropertyName("auth_id")]
public string? AuthId { get; init; }

Property Value

string

Availability

Gets the availability of the torrent data across connected peers.

[JsonPropertyName("availability")]
public double Availability { get; init; }

Property Value

double

Cached

Gets a value indicating whether this torrent is cached on the server.

[JsonPropertyName("cached")]
public bool Cached { get; init; }

Property Value

bool

CachedAt

Gets the date and time when the torrent was cached, or null if not cached.

[JsonPropertyName("cached_at")]
public DateTimeOffset? CachedAt { get; init; }

Property Value

DateTimeOffset?

CreatedAt

Gets the date and time when the torrent was created, or null if not available.

[JsonPropertyName("created_at")]
public DateTimeOffset? CreatedAt { get; init; }

Property Value

DateTimeOffset?

DownloadFinished

Gets a value indicating whether the download has finished.

[JsonPropertyName("download_finished")]
public bool DownloadFinished { get; init; }

Property Value

bool

DownloadPath

Gets the download path identifier for this torrent, or null if not available.

[JsonPropertyName("download_path")]
public string? DownloadPath { get; init; }

Property Value

string

DownloadPresent

Gets a value indicating whether the downloaded data is present on the server.

[JsonPropertyName("download_present")]
public bool DownloadPresent { get; init; }

Property Value

bool

DownloadSpeed

Gets the current download speed in bytes per second.

[JsonPropertyName("download_speed")]
public long DownloadSpeed { get; init; }

Property Value

long

DownloadState

Gets the current download state as a string descriptor, or null if not available.

[JsonPropertyName("download_state")]
public string? DownloadState { get; init; }

Property Value

string

Eta

Gets the estimated time of arrival (completion) in seconds.

[JsonPropertyName("eta")]
public long Eta { get; init; }

Property Value

long

ExpiresAt

Gets the date and time when the torrent will expire, or null if not set.

[JsonPropertyName("expires_at")]
public DateTimeOffset? ExpiresAt { get; init; }

Property Value

DateTimeOffset?

Files

Gets the list of files contained in this torrent.

[JsonPropertyName("files")]
public IReadOnlyList<DownloadFile> Files { get; init; }

Property Value

IReadOnlyList<DownloadFile>

Hash

Gets the info hash of the torrent, or null if not available.

[JsonPropertyName("hash")]
public string? Hash { get; init; }

Property Value

string

Id

Gets the unique identifier of the torrent.

[JsonPropertyName("id")]
public long Id { get; init; }

Property Value

long

InactiveCheck

Gets the inactive check interval in seconds.

[JsonPropertyName("inactive_check")]
public long InactiveCheck { get; init; }

Property Value

long

IsPrivate

Gets a value indicating whether this torrent uses a private tracker.

[JsonPropertyName("private")]
public bool IsPrivate { get; init; }

Property Value

bool

LongTermSeeding

Gets a value indicating whether long-term seeding is enabled for this torrent.

[JsonPropertyName("long_term_seeding")]
public bool LongTermSeeding { get; init; }

Property Value

bool

Magnet

Gets the magnet URI of the torrent, or null if not available.

[JsonPropertyName("magnet")]
public string? Magnet { get; init; }

Property Value

string

Name

Gets the display name of the torrent.

[JsonPropertyName("name")]
public string Name { get; init; }

Property Value

string

Owner

Gets the owner identifier (UUID) of this torrent, or null if not available.

[JsonPropertyName("owner")]
public string? Owner { get; init; }

Property Value

string

Peers

Gets the number of peers connected to this torrent.

[JsonPropertyName("peers")]
public int Peers { get; init; }

Property Value

int

Progress

Gets the download progress as a value between 0.0 and 1.0.

[JsonPropertyName("progress")]
public double Progress { get; init; }

Property Value

double

Ratio

Gets the upload-to-download ratio of the torrent.

[JsonPropertyName("ratio")]
public double Ratio { get; init; }

Property Value

double

SeedTorrent

Gets a value indicating whether this torrent should be seeded after completion.

[JsonPropertyName("seed_torrent")]
public bool SeedTorrent { get; init; }

Property Value

bool

Seeds

Gets the number of seeds connected to this torrent.

[JsonPropertyName("seeds")]
public int Seeds { get; init; }

Property Value

int

Server

Gets the server identifier where the torrent is hosted.

[JsonPropertyName("server")]
public int Server { get; init; }

Property Value

int

Size

Gets the total size of the torrent in bytes.

[JsonPropertyName("size")]
public long Size { get; init; }

Property Value

long

Tags

Gets the list of tags associated with this torrent.

[JsonPropertyName("tags")]
public IReadOnlyList<string> Tags { get; init; }

Property Value

IReadOnlyList<string>

TorrentFile

Gets a value indicating whether the original torrent file is available.

[JsonPropertyName("torrent_file")]
public bool TorrentFile { get; init; }

Property Value

bool

TotalDownloaded

Gets the total number of bytes downloaded for this torrent.

[JsonPropertyName("total_downloaded")]
public long TotalDownloaded { get; init; }

Property Value

long

TotalUploaded

Gets the total number of bytes uploaded for this torrent.

[JsonPropertyName("total_uploaded")]
public long TotalUploaded { get; init; }

Property Value

long

Tracker

Gets the tracker URL for this torrent, or null if not available.

[JsonPropertyName("tracker")]
public string? Tracker { get; init; }

Property Value

string

TrackerMessage

Gets the tracker message for this torrent, or null if none.

[JsonPropertyName("tracker_message")]
public string? TrackerMessage { get; init; }

Property Value

string

UpdatedAt

Gets the date and time when the torrent was last updated, or null if not available.

[JsonPropertyName("updated_at")]
public DateTimeOffset? UpdatedAt { get; init; }

Property Value

DateTimeOffset?

UploadSpeed

Gets the current upload speed in bytes per second.

[JsonPropertyName("upload_speed")]
public long UploadSpeed { get; init; }

Property Value

long