diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-05-05 23:21:13 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-05-05 23:21:13 +0300 |
commit | 329b011f8ab4c222c41b5b477b24752e06da4f48 (patch) | |
tree | 256fd1abc61c1ae550ddcaf9d7cd386723c758ca | |
parent | bf490e2c7e4c48c1dc4628a41b97ca91de0ff8da (diff) |
hook for webtorrent-hybrid to force-add trackers
-rw-r--r-- | lib/torrent.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 91ebcbb..3082ccf 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -126,6 +126,14 @@ function Torrent (torrentId, opts) { self.parsedTorrent.announce = [].concat.apply([], createTorrent.announceList) } + // So `webtorrent-hybrid` can force specific trackers to be used + if (global.WEBTORRENT_ANNOUNCE) { + self.parsedTorrent.announce.push.apply( + self.parsedTorrent.announce, + global.WEBTORRENT_ANNOUNCE + ) + } + // create swarm self.swarm = new Swarm(self.infoHash, self.client.peerId, { handshake: { dht: !!self.client.dht } |