From 9b3b776733bb96d4912131aa64644fe731254268 Mon Sep 17 00:00:00 2001 From: Mitra Ardron Date: Mon, 30 Jul 2018 16:51:52 -0700 Subject: [PATCH] Allow for test magnet link in TransportWEBTORRENT --- TransportWEBTORRENT.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TransportWEBTORRENT.js b/TransportWEBTORRENT.js index 0fbbdd2..b136ab0 100644 --- a/TransportWEBTORRENT.js +++ b/TransportWEBTORRENT.js @@ -123,6 +123,10 @@ class TransportWEBTORRENT extends Transport { // If not, then add the torrentId to the torrent client if (!torrent) { + // This can be added in to rewrite a known torrent for example to test a different tracker. + //let testid = "magnet:?xt=urn:btih:ELHVM7F4VEOTZQFDHCX7OZXUXKINUIPJ&tr=http%3A%2F%2Fbt1.archive.org%3A6969%2Fannounce&tr=http%3A%2F%2Fbt2.archive.org%3A6969%2Fannounce&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&tr=wss%3A%2F%2Ftracker.fastcast.nz&ws=https%3A%2F%2Fdweb.me%2Farc%2Farchive.org%2Fdownload%2F&xs=https%3A%2F%2Fdweb.me%2Farc%2Farchive.org%2Ftorrent%2Fcommute"; + //let testidnewtrack = "magnet:?xt=urn:btih:ELHVM7F4VEOTZQFDHCX7OZXUXKINUIPJ&tr=http%3A%2F%2Fbt1.archive.org%3A6969%2Fannounce&tr=http%3A%2F%2Fbt2.archive.org%3A6969%2Fannounce&tr=wss%3A%2F%2Fdweb.archive.org:6969&ws=https%3A%2F%2Fdweb.me%2Farc%2Farchive.org%2Fdownload%2F&xs=https%3A%2F%2Fdweb.me%2Farc%2Farchive.org%2Ftorrent%2Fcommute"; + //if (torrentId === testid) torrentId = testidnewtrack; torrent = this.webtorrent.add(torrentId); torrent.once("error", (err) => {