aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-11 17:10:53 +0200
committerChocobozzz <me@florianbigard.com>2022-10-11 17:14:54 +0200
commitdd84f4f2639cd67b8ff8c04423c59667d55180bf (patch)
treea5a583157735a05f8ebbae953c4deca8f328856d /shared/server-commands
parent5e1bd8690b740e10aa3a959eb3ecaf7a0aae87cf (diff)
downloadPeerTube-dd84f4f2639cd67b8ff8c04423c59667d55180bf.tar.gz
PeerTube-dd84f4f2639cd67b8ff8c04423c59667d55180bf.tar.zst
PeerTube-dd84f4f2639cd67b8ff8c04423c59667d55180bf.zip
Wait segment sha processing
Diffstat (limited to 'shared/server-commands')
-rw-r--r--shared/server-commands/videos/live-command.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/server-commands/videos/live-command.ts b/shared/server-commands/videos/live-command.ts
index a0e0c7c8f..b163f7189 100644
--- a/shared/server-commands/videos/live-command.ts
+++ b/shared/server-commands/videos/live-command.ts
@@ -186,6 +186,15 @@ export class LiveCommand extends AbstractCommand {
186 defaultExpectedStatus: HttpStatusCode.OK_200 186 defaultExpectedStatus: HttpStatusCode.OK_200
187 }) 187 })
188 188
189 const video = await server.videos.get({ id: videoUUID })
190 const hlsPlaylist = video.streamingPlaylists[0]
191
192 const shaBody = await server.streamingPlaylists.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url })
193
194 if (!shaBody[segmentName]) {
195 throw new Error('Segment SHA does not exist')
196 }
197
189 error = false 198 error = false
190 } catch { 199 } catch {
191 error = true 200 error = true