mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Wait segment sha processing
This commit is contained in:
parent
5e1bd8690b
commit
dd84f4f263
2 changed files with 10 additions and 1 deletions
|
@ -186,6 +186,15 @@ export class LiveCommand extends AbstractCommand {
|
|||
defaultExpectedStatus: HttpStatusCode.OK_200
|
||||
})
|
||||
|
||||
const video = await server.videos.get({ id: videoUUID })
|
||||
const hlsPlaylist = video.streamingPlaylists[0]
|
||||
|
||||
const shaBody = await server.streamingPlaylists.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url })
|
||||
|
||||
if (!shaBody[segmentName]) {
|
||||
throw new Error('Segment SHA does not exist')
|
||||
}
|
||||
|
||||
error = false
|
||||
} catch {
|
||||
error = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue