]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Reexport Torrent.MetaInfo
authorMatt Joiner <anacrolix@gmail.com>
Sat, 16 Jan 2016 14:49:04 +0000 (01:49 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 16 Jan 2016 14:49:04 +0000 (01:49 +1100)
t.go

diff --git a/t.go b/t.go
index 7a435ce31d28d366c555e1c5fc9f318ae2f61305..8f792bf9bfc3d6fe7ae0b52c32f21f259a45695a 100644 (file)
--- 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()
+}