From: Matt Joiner Date: Sat, 16 Jan 2016 14:49:04 +0000 (+1100) Subject: Reexport Torrent.MetaInfo X-Git-Tag: v1.0.0~941 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1a20ac23da33b7f897697229efa9947d88a22db2;p=btrtrc.git Reexport Torrent.MetaInfo --- diff --git a/t.go b/t.go index 7a435ce3..8f792bf9 100644 --- a/t.go +++ b/t.go @@ -107,3 +107,11 @@ func (t Torrent) Length() int64 { return -1 } } + +// Returns a run-time generated metainfo for the torrent that includes the +// info bytes and announce-list as currently known to the client. +func (t Torrent) MetaInfo() *metainfo.MetaInfo { + t.cl.mu.Lock() + defer t.cl.mu.Unlock() + return t.torrent.MetaInfo() +}