From 53023be33af420675d0060eb95c99a8038457564 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Jun 2022 10:29:43 +0200 Subject: Fix fast restream in saved permanent live --- server/lib/live/live-utils.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/lib/live') diff --git a/server/lib/live/live-utils.ts b/server/lib/live/live-utils.ts index 6365e23db..6305a97a8 100644 --- a/server/lib/live/live-utils.ts +++ b/server/lib/live/live-utils.ts @@ -10,20 +10,20 @@ function buildConcatenatedName (segmentOrPlaylistPath: string) { return 'concat-' + num[1] + '.ts' } -async function cleanupPermanentLive (video: MVideo, streamingPlaylist?: MStreamingPlaylist) { +async function cleanupPermanentLive (video: MVideo, streamingPlaylist: MStreamingPlaylist) { const hlsDirectory = getLiveDirectory(video) await cleanupTMPLiveFiles(hlsDirectory) - if (streamingPlaylist) await streamingPlaylist.destroy() + await streamingPlaylist.destroy() } -async function cleanupNormalLive (video: MVideo, streamingPlaylist?: MStreamingPlaylist) { +async function cleanupUnsavedNormalLive (video: MVideo, streamingPlaylist: MStreamingPlaylist) { const hlsDirectory = getLiveDirectory(video) await remove(hlsDirectory) - if (streamingPlaylist) await streamingPlaylist.destroy() + await streamingPlaylist.destroy() } async function cleanupTMPLiveFiles (hlsDirectory: string) { @@ -49,7 +49,7 @@ async function cleanupTMPLiveFiles (hlsDirectory: string) { export { cleanupPermanentLive, - cleanupNormalLive, + cleanupUnsavedNormalLive, cleanupTMPLiveFiles, buildConcatenatedName } -- cgit v1.2.3