mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Prevent HLS transcoding after webtorrent transcoding
This commit is contained in:
parent
3e8c3fcdb0
commit
0f11ec8dd3
6 changed files with 42 additions and 9 deletions
|
@ -25,7 +25,11 @@ async function checkFilesInObjectStorage (video: VideoDetails) {
|
|||
await makeRawRequest(file.fileUrl, HttpStatusCode.OK_200)
|
||||
}
|
||||
|
||||
for (const file of video.streamingPlaylists[0].files) {
|
||||
const streamingPlaylistFiles = video.streamingPlaylists.length === 0
|
||||
? []
|
||||
: video.streamingPlaylists[0].files
|
||||
|
||||
for (const file of streamingPlaylistFiles) {
|
||||
expectStartWith(file.fileUrl, ObjectStorageCommand.getPlaylistBaseUrl())
|
||||
await makeRawRequest(file.fileUrl, HttpStatusCode.OK_200)
|
||||
}
|
||||
|
@ -127,6 +131,25 @@ function runTests (objectStorage: boolean) {
|
|||
}
|
||||
})
|
||||
|
||||
it('Should only generate WebTorrent', async function () {
|
||||
this.timeout(60000)
|
||||
|
||||
await servers[0].videos.removeHLSFiles({ videoId: videoUUID })
|
||||
await waitJobs(servers)
|
||||
|
||||
await servers[0].videos.runTranscoding({ videoId: videoUUID, transcodingType: 'webtorrent' })
|
||||
await waitJobs(servers)
|
||||
|
||||
for (const server of servers) {
|
||||
const videoDetails = await server.videos.get({ id: videoUUID })
|
||||
|
||||
expect(videoDetails.files).to.have.lengthOf(5)
|
||||
expect(videoDetails.streamingPlaylists).to.have.lengthOf(0)
|
||||
|
||||
if (objectStorage) await checkFilesInObjectStorage(videoDetails)
|
||||
}
|
||||
})
|
||||
|
||||
it('Should not have updated published at attributes', async function () {
|
||||
const video = await servers[0].videos.get({ id: videoUUID })
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue