From d7695c45857ce14ccc200f2c2131d0fb840293bb Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 9 Mar 2015 17:35:29 +1100 Subject: [PATCH] Change torrent.Name() --- torrent.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 { -- 2.48.1