]> Sergey Matveev's repositories - btrtrc.git/blobdiff - metainfo/metainfo.go
Fix error unmarshalling bad metainfo nodes field
[btrtrc.git] / metainfo / metainfo.go
index cd787260c150e972b8987713b65904a7f30c766b..fbf48671d484a0e3342f855585a98a91975c42f2 100644 (file)
@@ -10,10 +10,10 @@ import (
 )
 
 type MetaInfo struct {
-       InfoBytes    bencode.Bytes `bencode:"info,omitempty"`          // BEP 3
-       Announce     string        `bencode:"announce,omitempty"`      // BEP 3
-       AnnounceList AnnounceList  `bencode:"announce-list,omitempty"` // BEP 12
-       Nodes        []Node        `bencode:"nodes,omitempty"`         // BEP 5
+       InfoBytes    bencode.Bytes `bencode:"info,omitempty"`                              // BEP 3
+       Announce     string        `bencode:"announce,omitempty"`                          // BEP 3
+       AnnounceList AnnounceList  `bencode:"announce-list,omitempty"`                     // BEP 12
+       Nodes        []Node        `bencode:"nodes,omitempty,ignore_unmarshal_type_error"` // BEP 5
        // Where's this specified? Mentioned at
        // https://wiki.theory.org/index.php/BitTorrentSpecification: (optional) the creation time of
        // the torrent, in standard UNIX epoch format (integer, seconds since 1-Jan-1970 00:00:00 UTC)