From: Matt Joiner <anacrolix@gmail.com>
Date: Fri, 27 Mar 2015 15:51:16 +0000 (+1100)
Subject: Show number of torrents in the client status
X-Git-Tag: v1.0.0~1229
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5ecde3a874b669942280cc14a04378c92fc8c544;p=btrtrc.git

Show number of torrents in the client status
---

diff --git a/client.go b/client.go
index 8b21c44c..f27db6a9 100644
--- a/client.go
+++ b/client.go
@@ -237,6 +237,7 @@ func (cl *Client) WriteStatus(_w io.Writer) {
 		fmt.Fprintf(w, "DHT announces: %d\n", cl.dHT.NumConfirmedAnnounces)
 		fmt.Fprintf(w, "Outstanding transactions: %d\n", dhtStats.NumOutstandingTransactions)
 	}
+	fmt.Fprintf(w, "# Torrents: %d\n", len(cl.torrents))
 	fmt.Fprintln(w)
 	for _, t := range cl.sortedTorrents() {
 		if t.Name() == "" {