Reexport Torrent.MetaInfo

This commit is contained in:
Matt Joiner 2016-01-17 01:49:04 +11:00
parent 89a6a20af6
commit 1a20ac23da
1 changed files with 8 additions and 0 deletions

8
t.go
View File

@ -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()
}