cmd/torrent-metainfo-pprint: Add Announce and AnnounceList keys

This commit is contained in:
Matt Joiner 2016-05-23 10:18:39 +10:00
parent c5e0c806ea
commit abbbb6e115
1 changed files with 8 additions and 6 deletions

View File

@ -35,12 +35,14 @@ func main() {
continue
}
d := map[string]interface{}{
"Name": info.Name,
"NumPieces": info.NumPieces(),
"PieceLength": info.PieceLength,
"InfoHash": metainfo.Info.Hash().HexString(),
"NumFiles": len(info.UpvertedFiles()),
"TotalLength": info.TotalLength(),
"Name": info.Name,
"NumPieces": info.NumPieces(),
"PieceLength": info.PieceLength,
"InfoHash": metainfo.Info.Hash().HexString(),
"NumFiles": len(info.UpvertedFiles()),
"TotalLength": info.TotalLength(),
"Announce": metainfo.Announce,
"AnnounceList": metainfo.AnnounceList,
}
if flags.Files {
d["Files"] = info.Files