]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Include num pieces in torrent status
authorMatt Joiner <anacrolix@gmail.com>
Fri, 25 Sep 2015 12:05:32 +0000 (22:05 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 25 Sep 2015 12:05:32 +0000 (22:05 +1000)
torrent.go

index a9431a38d56a380b91e4777267e8a4fedb051bee..6498c23ec99fa70795e5290718e66c1590ca29e5 100644 (file)
@@ -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)))