2
0
mirror of synced 2025-02-24 22:58:28 +00:00

torrent-metainfo-pprint: include the 'nodes' field into the output when non-empty

This commit is contained in:
Yaroslav Kolomiiets 2020-05-20 17:18:00 +01:00 committed by Matt Joiner
parent c04f09ee42
commit 6ea0344efd

View File

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