]> Sergey Matveev's repositories - btrtrc.git/blobdiff - torrent.go
Big logging cleanup to improve experience from README
[btrtrc.git] / torrent.go
index 92c13e2f8a0474c56e6ba086804dca29c5ad6459..52fff16a15ecff935d43b853898665a86503d6e9 100644 (file)
@@ -494,7 +494,10 @@ func (t *Torrent) name() string {
        if t.haveInfo() {
                return t.info.Name
        }
-       return t.displayName
+       if t.displayName != "" {
+               return t.displayName
+       }
+       return "infohash:" + t.infoHash.HexString()
 }
 
 func (t *Torrent) pieceState(index pieceIndex) (ret PieceState) {