Add Info "name.utf-8" field

Comes up frequently with non-English torrents
This commit is contained in:
Matt Joiner 2022-03-17 14:59:36 +11:00
parent 859f670964
commit a1072bfee9
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782
1 changed files with 4 additions and 3 deletions

View File

@ -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.