add encoding to .torrent default config

This commit is contained in:
whr819987540 2023-05-04 17:29:53 +08:00
parent d8f10ed70a
commit ffd17b70a3
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ func (mi MetaInfo) Write(w io.Writer) error {
func (mi *MetaInfo) SetDefaults() { func (mi *MetaInfo) SetDefaults() {
mi.CreatedBy = "github.com/anacrolix/torrent" mi.CreatedBy = "github.com/anacrolix/torrent"
mi.CreationDate = time.Now().Unix() mi.CreationDate = time.Now().Unix()
mi.Encoding = "UTF-8"
} }
// Creates a Magnet from a MetaInfo. Optional infohash and parsed info can be provided. // Creates a Magnet from a MetaInfo. Optional infohash and parsed info can be provided.