]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Show number of torrents in the client status
authorMatt Joiner <anacrolix@gmail.com>
Fri, 27 Mar 2015 15:51:16 +0000 (02:51 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 27 Mar 2015 15:51:16 +0000 (02:51 +1100)
client.go

index 8b21c44ce66d5a917888794bb6f5197bffda315f..f27db6a906635d1e2e69e7fa1f4315cd3064a17f 100644 (file)
--- 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() == "" {