From: Matt Joiner Date: Fri, 25 Sep 2015 12:05:32 +0000 (+1000) Subject: Include num pieces in torrent status X-Git-Tag: v1.0.0~1033 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=52b07059564caf2a7f0d7d40a2b5a44f9e25f363;p=btrtrc.git Include num pieces in torrent status --- diff --git a/torrent.go b/torrent.go index a9431a38..6498c23e 100644 --- a/torrent.go +++ b/torrent.go @@ -403,7 +403,8 @@ func (t *torrent) writeStatus(w io.Writer, cl *Client) { } }()) if t.haveInfo() { - fmt.Fprint(w, "Pieces:") + fmt.Fprintf(w, "Num Pieces: %d\n", t.numPieces()) + fmt.Fprint(w, "Piece States:") for _, psr := range t.pieceStateRuns() { w.Write([]byte(" ")) w.Write([]byte(pieceStateRunStatusChars(psr)))