]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add comment to metainfo.MetaInfo.CreationDate
authorMatt Joiner <anacrolix@gmail.com>
Wed, 13 May 2020 04:33:19 +0000 (14:33 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 13 May 2020 04:33:26 +0000 (14:33 +1000)
metainfo/metainfo.go

index 5e84b012259464e8aeb3f989830fa662e6c503c6..7dbacd1a12f4c8a8cbb82717df76a69c0a746b35 100644 (file)
@@ -13,11 +13,14 @@ type MetaInfo struct {
        Announce     string        `bencode:"announce,omitempty"`      // BEP 3
        AnnounceList AnnounceList  `bencode:"announce-list,omitempty"` // BEP 12
        Nodes        []Node        `bencode:"nodes,omitempty"`         // BEP 5
-       CreationDate int64         `bencode:"creation date,omitempty,ignore_unmarshal_type_error"`
-       Comment      string        `bencode:"comment,omitempty"`
-       CreatedBy    string        `bencode:"created by,omitempty"`
-       Encoding     string        `bencode:"encoding,omitempty"`
-       UrlList      UrlList       `bencode:"url-list,omitempty"` // BEP 19
+       // 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)
+       CreationDate int64   `bencode:"creation date,omitempty,ignore_unmarshal_type_error"`
+       Comment      string  `bencode:"comment,omitempty"`
+       CreatedBy    string  `bencode:"created by,omitempty"`
+       Encoding     string  `bencode:"encoding,omitempty"`
+       UrlList      UrlList `bencode:"url-list,omitempty"` // BEP 19
 }
 
 // Load a MetaInfo from an io.Reader. Returns a non-nil error in case of