From 587f28d2fa30f4f7176edcbc82a0f072facbd2ec Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 13 May 2020 14:33:19 +1000 Subject: [PATCH] Add comment to metainfo.MetaInfo.CreationDate --- metainfo/metainfo.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/metainfo/metainfo.go b/metainfo/metainfo.go index 5e84b012..7dbacd1a 100644 --- a/metainfo/metainfo.go +++ b/metainfo/metainfo.go @@ -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 -- 2.48.1