diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-19 14:44:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-05-19 14:44:57 +0200 |
commit | 3733175b6b53d8f9cdc3e1752110a030508907af (patch) | |
tree | aec176231b8ce0bb14e9117bce881943cc644ee7 /server/lib | |
parent | ec720affe962437b85bd59a83b276c1da2ee7769 (diff) | |
download | PeerTube-3733175b6b53d8f9cdc3e1752110a030508907af.tar.gz PeerTube-3733175b6b53d8f9cdc3e1752110a030508907af.tar.zst PeerTube-3733175b6b53d8f9cdc3e1752110a030508907af.zip |
Remove wait before publishing master playlist
It doesn't seem necessary
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/live/shared/muxing-session.ts | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/server/lib/live/shared/muxing-session.ts b/server/lib/live/shared/muxing-session.ts index 0921254cb..6632499ff 100644 --- a/server/lib/live/shared/muxing-session.ts +++ b/server/lib/live/shared/muxing-session.ts | |||
@@ -17,7 +17,6 @@ import { | |||
17 | import { VideoFileModel } from '@server/models/video/video-file' | 17 | import { VideoFileModel } from '@server/models/video/video-file' |
18 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 18 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
19 | import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '@server/types/models' | 19 | import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '@server/types/models' |
20 | import { wait } from '@shared/core-utils' | ||
21 | import { VideoStorage, VideoStreamingPlaylistType } from '@shared/models' | 20 | import { VideoStorage, VideoStreamingPlaylistType } from '@shared/models' |
22 | import { | 21 | import { |
23 | generateHLSMasterPlaylistFilename, | 22 | generateHLSMasterPlaylistFilename, |
@@ -190,17 +189,6 @@ class MuxingSession extends EventEmitter { | |||
190 | if (this.masterPlaylistCreated === true) return | 189 | if (this.masterPlaylistCreated === true) return |
191 | 190 | ||
192 | try { | 191 | try { |
193 | let masterPlaylistContent: string | ||
194 | |||
195 | do { | ||
196 | masterPlaylistContent = await readFile(path, 'utf8') | ||
197 | |||
198 | if (!masterPlaylistContent) { | ||
199 | await wait(250) | ||
200 | logger.debug('Waiting for master playlist generation for ' + this.videoUUID, this.lTags()) | ||
201 | } | ||
202 | } while (!masterPlaylistContent) // Not generated yet | ||
203 | |||
204 | if (this.streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) { | 192 | if (this.streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) { |
205 | const url = await storeHLSFileFromFilename(this.streamingPlaylist, this.streamingPlaylist.playlistFilename) | 193 | const url = await storeHLSFileFromFilename(this.streamingPlaylist, this.streamingPlaylist.playlistFilename) |
206 | 194 | ||