torrent.go | 6 +++++- diff --git a/torrent.go b/torrent.go index 78162aa07d295ed9b5918374db662d22e4030928..1e4302b74ab6e86655741adcc91d1eec13ac5289 100644 --- a/torrent.go +++ b/torrent.go @@ -344,7 +344,11 @@ } } func (t *torrent) String() string { - return t.Name() + s := t.Name() + if s == "" { + s = fmt.Sprintf("%x", t.InfoHash) + } + return s } func (t *torrent) haveInfo() bool {