]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Change torrent.Name()
authorMatt Joiner <anacrolix@gmail.com>
Mon, 9 Mar 2015 06:35:29 +0000 (17:35 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 9 Mar 2015 06:35:29 +0000 (17:35 +1100)
torrent.go

index f0dd4c07a72238e34ee8d9fb649d4f8cd6ddd572..711b58c4faa0c6e72a1bc662874aeb668bf91468 100644 (file)
@@ -336,6 +336,8 @@ func (t *torrent) SetMetadataSize(bytes int64) {
        t.metadataHave = make([]bool, (bytes+(1<<14)-1)/(1<<14))
 }
 
+// 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 {
        if t.haveInfo() {
                return t.Info.Name
@@ -343,7 +345,7 @@ func (t *torrent) Name() string {
        if t.DisplayName != "" {
                return t.DisplayName
        }
-       return t.InfoHash.HexString()
+       return ""
 }
 
 func (t *torrent) pieceStatusChar(index int) byte {