From: Matt Joiner Date: Sun, 22 Nov 2015 07:44:08 +0000 (+1100) Subject: torrent.DisplayName should not be exported X-Git-Tag: v1.0.0~983 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=79eb1ca0d56ec5ce8784eeb019e9e9a54ce5ec01;p=btrtrc.git torrent.DisplayName should not be exported --- 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) {