aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/webtorrent.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-18 10:15:11 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-18 13:38:09 +0100
commitd9a2a03196275065c28f4a0b7d4d7bc9992d77a1 (patch)
tree14579db95cd07506bf3d8e5c0af3ef1630e8700c /server/helpers/webtorrent.ts
parent2451916e45420fedf556913ce121f3964c4b57d6 (diff)
downloadPeerTube-d9a2a03196275065c28f4a0b7d4d7bc9992d77a1.tar.gz
PeerTube-d9a2a03196275065c28f4a0b7d4d7bc9992d77a1.tar.zst
PeerTube-d9a2a03196275065c28f4a0b7d4d7bc9992d77a1.zip
Don't guess remote tracker URL
Diffstat (limited to 'server/helpers/webtorrent.ts')
-rw-r--r--server/helpers/webtorrent.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts
index 73418aa0a..4e08c27c6 100644
--- a/server/helpers/webtorrent.ts
+++ b/server/helpers/webtorrent.ts
@@ -107,16 +107,13 @@ async function createTorrentAndSetInfoHash (
107 videoFile.torrentFilename = torrentFilename 107 videoFile.torrentFilename = torrentFilename
108} 108}
109 109
110// FIXME: merge/refactor videoOrPlaylist and video arguments
111function generateMagnetUri ( 110function generateMagnetUri (
112 videoOrPlaylist: MVideo | MStreamingPlaylistVideo,
113 video: MVideoWithHost, 111 video: MVideoWithHost,
114 videoFile: MVideoFileRedundanciesOpt, 112 videoFile: MVideoFileRedundanciesOpt,
115 baseUrlHttp: string, 113 trackerUrls: string[]
116 baseUrlWs: string
117) { 114) {
118 const xs = videoFile.getTorrentUrl() 115 const xs = videoFile.getTorrentUrl()
119 const announce = videoOrPlaylist.getTrackerUrls(baseUrlHttp, baseUrlWs) 116 const announce = trackerUrls
120 let urlList = [ videoFile.getFileUrl(video) ] 117 let urlList = [ videoFile.getFileUrl(video) ]
121 118
122 const redundancies = videoFile.RedundancyVideos 119 const redundancies = videoFile.RedundancyVideos