adding availability
This commit is contained in:
@@ -56,13 +56,15 @@ Torrent list requests should include:
|
||||
id, name, totalSize, downloadedEver, uploadedEver, uploadRatio,
|
||||
percentDone, status, eta, error, errorString, doneDate, isFinished,
|
||||
rateDownload, rateUpload, peersConnected, peersGettingFromUs, peersSendingToUs,
|
||||
peers
|
||||
availability, peers
|
||||
```
|
||||
|
||||
Peer objects are expected to include `address`, `clientName`, `progress`, `isDownloadingFrom`, `isUploadingTo`, `rateToClient`, and `rateToPeer` when available.
|
||||
|
||||
The UI definition of "peers at 100%" is an absolute count of `peers[]` entries whose `progress === 1.0`. Do not reinterpret it as a percentage of connected peers.
|
||||
|
||||
The UI availability value comes from Transmission's `availability` per-piece array. Render and sort it as a complete-copy estimate, treating `-1` entries as pieces available locally.
|
||||
|
||||
## Frontend Architecture
|
||||
|
||||
The frontend is a single page with module-level state in `web/app.js`. It polls on a user-selectable interval, defaults to 3 seconds, and fetches torrents and stats in parallel.
|
||||
@@ -84,7 +86,7 @@ Current sort keys:
|
||||
- `ratio`
|
||||
- `size`
|
||||
- `speed`: orders by combined download and upload speed descending, then download speed, upload speed, and name.
|
||||
- `peer100`: orders by peers at 100% descending, then connected peers descending, progress descending, and name ascending.
|
||||
- `availability`: orders by computed availability descending, then progress, then name.
|
||||
|
||||
## UI And Design Rules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user