From a1072bfee9024ac2079c501977e96423e668f15d Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 17 Mar 2022 14:59:36 +1100 Subject: [PATCH] Add Info "name.utf-8" field Comes up frequently with non-English torrents --- metainfo/info.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/metainfo/info.go b/metainfo/info.go index c907f492..a5011946 100644 --- a/metainfo/info.go +++ b/metainfo/info.go @@ -13,9 +13,10 @@ import ( // The info dictionary. type Info struct { - PieceLength int64 `bencode:"piece length"` // BEP3 - Pieces []byte `bencode:"pieces"` // BEP3 - Name string `bencode:"name"` // BEP3 + PieceLength int64 `bencode:"piece length"` // BEP3 + Pieces []byte `bencode:"pieces"` // BEP3 + Name string `bencode:"name"` // BEP3 + NameUtf8 string `bencode:"name.utf-8,omitempty"` Length int64 `bencode:"length,omitempty"` // BEP3, mutually exclusive with Files Private *bool `bencode:"private,omitempty"` // BEP27 // TODO: Document this field.