]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Merge trackers by magnet links if the torrent is already present
authorMatt Joiner <anacrolix@gmail.com>
Fri, 21 Nov 2014 06:10:52 +0000 (00:10 -0600)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 21 Nov 2014 06:10:52 +0000 (00:10 -0600)
client.go

index 75a04fb1b06e5e2abc90eabc9602c8416a901b56..304b0967b9617425ba538f0f6bc43941115a36cb 100644 (file)
--- a/client.go
+++ b/client.go
@@ -1337,6 +1337,7 @@ func (cl *Client) AddMagnet(uri string) (t Torrent, err error) {
        defer cl.mu.Unlock()
        t.torrent = cl.torrent(m.InfoHash)
        if t.torrent != nil {
+               t.addTrackers([][]string{m.Trackers})
                return
        }
        t.torrent, err = newTorrent(m.InfoHash, [][]string{m.Trackers}, cl.halfOpenLimit)