]> Sergey Matveev's repositories - btrtrc.git/blobdiff - t.go
Explicitly import Torrent.InfoHash
[btrtrc.git] / t.go
diff --git a/t.go b/t.go
index 8a561661e2198208eaeb601e3b1a4fc82d790aeb..607aa304cccccf10116c96daa0301ca45699b84b 100644 (file)
--- a/t.go
+++ b/t.go
@@ -12,6 +12,10 @@ type Torrent struct {
        *torrent
 }
 
+func (t Torrent) InfoHash() InfoHash {
+       return t.torrent.InfoHash
+}
+
 // Closed when the info (.Info()) for the torrent has become available. Using
 // features of Torrent that require the info before it is available will have
 // undefined behaviour.
@@ -49,7 +53,7 @@ func (t Torrent) NumPieces() int {
 
 func (t Torrent) Drop() {
        t.cl.mu.Lock()
-       t.cl.dropTorrent(t.InfoHash)
+       t.cl.dropTorrent(t.torrent.InfoHash)
        t.cl.mu.Unlock()
 }