From: Yaroslav Kolomiiets Date: Wed, 20 May 2020 16:18:00 +0000 (+0100) Subject: torrent-metainfo-pprint: include the 'nodes' field into the output when non-empty X-Git-Tag: v1.16.0~19 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6ea0344efd807ab9a3829945ea9760c65223ba72;p=btrtrc.git torrent-metainfo-pprint: include the 'nodes' field into the output when non-empty --- diff --git a/cmd/torrent-metainfo-pprint/main.go b/cmd/torrent-metainfo-pprint/main.go index 9970b7b8..c6ab27ec 100644 --- a/cmd/torrent-metainfo-pprint/main.go +++ b/cmd/torrent-metainfo-pprint/main.go @@ -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() }