From: Matt Joiner Date: Sat, 23 Aug 2014 17:11:35 +0000 (+1000) Subject: Add piece length to torrent status X-Git-Tag: v1.0.0~1608 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6dce2cbf763906822cb17726bbb63196309a564e;p=btrtrc.git Add piece length to torrent status --- diff --git a/torrent.go b/torrent.go index 8ddbe7b7..792ce20f 100644 --- a/torrent.go +++ b/torrent.go @@ -222,6 +222,7 @@ func (t *torrent) NewMetadataExtensionMessage(c *connection, msgType int, piece func (t *torrent) WriteStatus(w io.Writer) { fmt.Fprintf(w, "Infohash: %x\n", t.InfoHash) + fmt.Fprintf(w, "Piece length: %d\n", t.UsualPieceSize()) fmt.Fprint(w, "Pieces: ") for index := range t.Pieces { fmt.Fprintf(w, "%c", t.pieceStatusChar(index))