mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Wait segment sha processing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user