From: Matt Joiner Date: Thu, 17 Mar 2022 03:59:36 +0000 (+1100) Subject: Add Info "name.utf-8" field X-Git-Tag: v1.42.0~8^2~3 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=a1072bfee9024ac2079c501977e96423e668f15d;p=btrtrc.git Add Info "name.utf-8" field Comes up frequently with non-English torrents --- 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.