]> Sergey Matveev's repositories - btrtrc.git/commitdiff
torrent-metainfo-pprint: include the 'nodes' field into the output when non-empty
authorYaroslav Kolomiiets <yarikos@gmail.com>
Wed, 20 May 2020 16:18:00 +0000 (17:18 +0100)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 21 May 2020 06:31:14 +0000 (16:31 +1000)
cmd/torrent-metainfo-pprint/main.go

index 9970b7b8094d24655d002ecb0cc3541b8f7ab440..c6ab27ec88eb1468e20ac324e24a2e1dc745c751 100644 (file)
@@ -47,6 +47,9 @@ func processReader(r io.Reader) error {
                "AnnounceList": metainfo.AnnounceList,
                "UrlList":      metainfo.UrlList,
        }
+       if len(metainfo.Nodes) >  0 {
+               d["Nodes"] = metainfo.Nodes
+       }
        if flags.Files {
                d["Files"] = info.UpvertedFiles()
        }