diff options
author | Chocobozzz <me@florianbigard.com> | 2019-11-15 15:06:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-11-25 10:59:43 +0100 |
commit | d7a25329f9e607894d29ab342b9cb66638b56dc0 (patch) | |
tree | 6cd6bc4f2689f78944238b313c93427423a932ac /shared/extra-utils/videos/videos.ts | |
parent | 14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff) | |
download | PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.gz PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.zst PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.zip |
Add ability to disable webtorrent
In favour of HLS
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index 75f7d58d7..1fcc949da 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -573,7 +573,6 @@ async function completeVideoCheck ( | |||
573 | // Transcoding enabled: extension will always be .mp4 | 573 | // Transcoding enabled: extension will always be .mp4 |
574 | if (attributes.files.length > 1) extension = '.mp4' | 574 | if (attributes.files.length > 1) extension = '.mp4' |
575 | 575 | ||
576 | const magnetUri = file.magnetUri | ||
577 | expect(file.magnetUri).to.have.lengthOf.above(2) | 576 | expect(file.magnetUri).to.have.lengthOf.above(2) |
578 | expect(file.torrentUrl).to.equal(`http://${attributes.account.host}/static/torrents/${videoDetails.uuid}-${file.resolution.id}.torrent`) | 577 | expect(file.torrentUrl).to.equal(`http://${attributes.account.host}/static/torrents/${videoDetails.uuid}-${file.resolution.id}.torrent`) |
579 | expect(file.fileUrl).to.equal(`http://${attributes.account.host}/static/webseed/${videoDetails.uuid}-${file.resolution.id}${extension}`) | 578 | expect(file.fileUrl).to.equal(`http://${attributes.account.host}/static/webseed/${videoDetails.uuid}-${file.resolution.id}${extension}`) |
@@ -594,7 +593,7 @@ async function completeVideoCheck ( | |||
594 | await testImage(url, attributes.previewfile, videoDetails.previewPath) | 593 | await testImage(url, attributes.previewfile, videoDetails.previewPath) |
595 | } | 594 | } |
596 | 595 | ||
597 | const torrent = await webtorrentAdd(magnetUri, true) | 596 | const torrent = await webtorrentAdd(file.magnetUri, true) |
598 | expect(torrent.files).to.be.an('array') | 597 | expect(torrent.files).to.be.an('array') |
599 | expect(torrent.files.length).to.equal(1) | 598 | expect(torrent.files.length).to.equal(1) |
600 | expect(torrent.files[0].path).to.exist.and.to.not.equal('') | 599 | expect(torrent.files[0].path).to.exist.and.to.not.equal('') |