From: Matt Joiner Date: Mon, 9 Mar 2015 06:35:29 +0000 (+1100) Subject: Change torrent.Name() X-Git-Tag: v1.0.0~1293 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=d7695c45857ce14ccc200f2c2131d0fb840293bb;p=btrtrc.git Change torrent.Name() --- diff --git a/torrent.go b/torrent.go index f0dd4c07..711b58c4 100644 --- a/torrent.go +++ b/torrent.go @@ -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 {