Interface Torrent

interface Torrent {
    id: number;
    name: string;
    downloadDir: string;
    addedDate: number;
    doneDate: number;
    comment: string;
    error: number;
    errorString: string;
    eta: number;
    etaIdle: number;
    isFinished: boolean;
    isDownloading: boolean;
    isPrivate: boolean;
    isStalled: boolean;
    leftUntilDone: number;
    magnetLink: string;
    metadataPercentComplete: number;
    peers: Peers[];
    peersFrom: PeersFrom[];
    priorities: number[];
    wanted: number[];
    webseeds: string[];
    peersConnected: number;
    peersGettingFromUs: number;
    peersSendingToUs: number;
    percentDone: number;
    queuePosition: number;
    rateDownload: number;
    rateUpload: number;
    recheckProgress: number;
    seedRatioLimit: number;
    seedIdleLimit: number;
    seedRatioMode: number;
    sizeWhenDone: number;
    totalSize: number;
    status: number;
    trackers: Tracker[];
    files: Files[];
    fileStats: FileStats[];
    hashString: string;
    creator: string;
    desiredAvailable: string;
    uploadRatio: number;
    uploadedEver: number;
    downloadedEver: number;
    downloadLimit: number;
    downloadLimited: boolean;
    corruptEver: number;
    webseedsSendingToUs: number;
    haveUnchecked: number;
    haveValid: number;
    honorsSessionLimits: boolean;
    labels: string[];
    manualAnnounceTime: number;
    maxConnectedPeers: number;
    secondsDownloading: number;
    secondsSeeding: number;
    activityDate: number;
    peer-limit: number;
}

Properties

id: number
name: string
downloadDir: string
addedDate: number

When the torrent was first added

doneDate: number

When the torrent finished downloading.

comment: string
error: number

Defines what kind of text is in errorString.

errorString: string

A warning or error message regarding the torrent.

eta: number

If downloading, estimated number of seconds left until the torrent is done. If seeding, estimated number of seconds left until seed ratio is reached.

etaIdle: number

If seeding, number of seconds left until the idle time limit is reached.

isFinished: boolean
isDownloading: boolean
isPrivate: boolean
isStalled: boolean

True if the torrent is running, but has been idle for long enough to be considered stalled.

leftUntilDone: number

Byte count of how much data is left to be downloaded until we've got all the pieces that we want.

magnetLink: string
metadataPercentComplete: number

How much of the metadata the torrent has. For torrents added from a .torrent this will always be 1. For magnet links, this number will from from 0 to 1 as the metadata is downloaded.

peers: Peers[]
peersFrom: PeersFrom[]
priorities: number[]
wanted: number[]
webseeds: string[]
peersConnected: number

Number of peers that we're connected to

peersGettingFromUs: number

Number of peers that we're sending data to

peersSendingToUs: number

Number of peers that are sending data to us.

percentDone: number

How much has been downloaded of the files the user wants. This differs from percentComplete if the user wants only some of the torrent's files. Range is [0..1]

queuePosition: number

This torrent's queue position. All torrents have a queue position, even if it's not queued.

rateDownload: number
rateUpload: number
recheckProgress: number
seedRatioLimit: number
seedIdleLimit: number
seedRatioMode: number
sizeWhenDone: number
totalSize: number
status: number
trackers: Tracker[]
files: Files[]
fileStats: FileStats[]
hashString: string
creator: string
desiredAvailable: string

Byte count of all the piece data we want and don't have yet, but that a connected peer does have.

uploadRatio: number
uploadedEver: number

Byte count of all data you've ever uploaded for this torrent.

downloadedEver: number

Byte count of all the non-corrupt data you've ever downloaded for this torrent. If you deleted the files and downloaded a second time, this will be 2*totalSize.

downloadLimit: number

Byte count of all the corrupt data you've ever downloaded for this torrent. If you're on a poisoned torrent, this number can grow very large.

downloadLimited: boolean
corruptEver: number
webseedsSendingToUs: number

Number of webseeds that are sending data to us.

haveUnchecked: number

Byte count of all the partial piece data we have for this torrent. As pieces become complete, this value may decrease as portions of it are moved to 'corrupt' or 'haveValid'.

haveValid: number
honorsSessionLimits: boolean
labels: string[]
manualAnnounceTime: number

time when one or more of the torrent's trackers will allow you to manually ask for more peers, or 0 if you can't

maxConnectedPeers: number
secondsDownloading: number

Cumulative seconds the torrent's ever spent downloading

secondsSeeding: number

Cumulative seconds the torrent's ever spent seeding

activityDate: number

The last time we uploaded or downloaded piece data on this torrent.

peer-limit: number