frontend/http: bandwidth are in bytes not pieces

This commit is contained in:
Jimmy Zelinskie 2017-10-18 11:51:19 -04:00
parent 1a0b5c56a6
commit df0de94337

View file

@ -65,19 +65,19 @@ func ParseAnnounce(r *http.Request, opts ParseOptions) (*bittorrent.AnnounceRequ
}
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")
if err != nil {
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")
if err != nil {
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")
if err != nil {
return nil, bittorrent.ClientError("failed to parse parameter: uploaded")