From 79eb1ca0d56ec5ce8784eeb019e9e9a54ce5ec01 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 22 Nov 2015 18:44:08 +1100 Subject: [PATCH] torrent.DisplayName should not be exported --- client.go | 2 +- torrent.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index 5e476224..b2c9813c 100644 --- a/client.go +++ b/client.go @@ -2183,7 +2183,7 @@ func (cl *Client) AddTorrentSpec(spec *TorrentSpec) (T Torrent, new bool, err er } } if spec.DisplayName != "" { - t.DisplayName = spec.DisplayName + t.displayName = spec.DisplayName } // Try to merge in info we have on the torrent. Any err left will // terminate the function. diff --git a/torrent.go b/torrent.go index 4d524a03..f2e473dc 100644 --- a/torrent.go +++ b/torrent.go @@ -85,7 +85,7 @@ type torrent struct { // mirror their respective URLs from the announce-list metainfo key. Trackers [][]tracker.Client // Name used if the info name isn't available. - DisplayName string + displayName string // The bencoded bytes of the info dict. MetaData []byte // Each element corresponds to the 16KiB metadata pieces. If true, we have @@ -311,7 +311,7 @@ func (t *torrent) Name() string { if t.haveInfo() { return t.Info.Name } - return t.DisplayName + return t.displayName } func (t *torrent) pieceState(index int) (ret PieceState) { -- 2.48.1