mirror of
https://github.com/LBRYFoundation/tracker.git
synced 2025-08-23 17:47:29 +00:00
frontend/http: bandwidth are in bytes not pieces
This commit is contained in:
parent
1a0b5c56a6
commit
df0de94337
1 changed files with 3 additions and 3 deletions
|
@ -65,19 +65,19 @@ func ParseAnnounce(r *http.Request, opts ParseOptions) (*bittorrent.AnnounceRequ
|
||||||
}
|
}
|
||||||
request.Peer.ID = bittorrent.PeerIDFromString(peerID)
|
request.Peer.ID = bittorrent.PeerIDFromString(peerID)
|
||||||
|
|
||||||
// Determine the number of remaining pieces for the client.
|
// Determine the number of remaining bytes for the client.
|
||||||
request.Left, err = qp.Uint64("left")
|
request.Left, err = qp.Uint64("left")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, bittorrent.ClientError("failed to parse parameter: left")
|
return nil, bittorrent.ClientError("failed to parse parameter: left")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine the number of pieces downloaded by the client.
|
// Determine the number of bytes downloaded by the client.
|
||||||
request.Downloaded, err = qp.Uint64("downloaded")
|
request.Downloaded, err = qp.Uint64("downloaded")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, bittorrent.ClientError("failed to parse parameter: downloaded")
|
return nil, bittorrent.ClientError("failed to parse parameter: downloaded")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine the number of pieces shared by the client.
|
// Determine the number of bytes shared by the client.
|
||||||
request.Uploaded, err = qp.Uint64("uploaded")
|
request.Uploaded, err = qp.Uint64("uploaded")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, bittorrent.ClientError("failed to parse parameter: uploaded")
|
return nil, bittorrent.ClientError("failed to parse parameter: uploaded")
|
||||||
|
|
Loading…
Add table
Reference in a new issue