]> Sergey Matveev's repositories - btrtrc.git/commitdiff
torrent.DisplayName should not be exported
authorMatt Joiner <anacrolix@gmail.com>
Sun, 22 Nov 2015 07:44:08 +0000 (18:44 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 22 Nov 2015 07:44:08 +0000 (18:44 +1100)
client.go
torrent.go

index 5e476224f9b2ec6c9ae3006275d50098d928b021..b2c9813c8b63c9d221609e85c99344d4f6e14a8e 100644 (file)
--- 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.
index 4d524a03e92829b3309a794a31bf7a64d8cc12af..f2e473dcbb1ddc4af8f4f5fadaf43b9cfaa5698d 100644 (file)
@@ -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) {