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

diff --git a/t.go b/t.go
index 8f792bf9bfc3d6fe7ae0b52c32f21f259a45695a..23085d1b0bcdc9759bdc4ce64caca7466910c635 100644 (file)
--- a/t.go
+++ b/t.go
@@ -28,7 +28,7 @@ func (t Torrent) GotInfo() <-chan struct{} {
        return t.torrent.gotMetainfo
 }
 
-// Returns the metainfo, or nil if it's not yet available.
+// Returns the metainfo info dictionary, or nil if it's not yet available.
 func (t Torrent) Info() *metainfo.Info {
        return t.torrent.Info
 }
@@ -53,6 +53,8 @@ func (t Torrent) PieceStateRuns() []PieceStateRun {
        return t.torrent.pieceStateRuns()
 }
 
+// The number of pieces in the torrent. This requires that the info has been
+// obtained first.
 func (t Torrent) NumPieces() int {
        return t.torrent.numPieces()
 }
@@ -93,6 +95,8 @@ func (t Torrent) SetDisplayName(dn string) {
        t.torrent.setDisplayName(dn)
 }
 
+// The current working name for the torrent. Either the name in the info dict,
+// or a display name given such as by the dn value in a magnet link, or "".
 func (t Torrent) Name() string {
        t.cl.mu.Lock()
        defer t.cl.mu.Unlock()