aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/live
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-23 10:29:43 +0200
committerChocobozzz <me@florianbigard.com>2022-06-23 10:30:48 +0200
commit53023be33af420675d0060eb95c99a8038457564 (patch)
tree699a13694b0c1c8589d10de95184708a451fcab4 /server/lib/live
parent50341c8fe988ca2a3d7c700f9aa918673dc979c2 (diff)
downloadPeerTube-53023be33af420675d0060eb95c99a8038457564.tar.gz
PeerTube-53023be33af420675d0060eb95c99a8038457564.tar.zst
PeerTube-53023be33af420675d0060eb95c99a8038457564.zip
Fix fast restream in saved permanent live
Diffstat (limited to 'server/lib/live')
-rw-r--r--server/lib/live/live-utils.ts10
1 files changed, 5 insertions, 5 deletions
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) {
10 return 'concat-' + num[1] + '.ts' 10 return 'concat-' + num[1] + '.ts'
11} 11}
12 12
13async function cleanupPermanentLive (video: MVideo, streamingPlaylist?: MStreamingPlaylist) { 13async function cleanupPermanentLive (video: MVideo, streamingPlaylist: MStreamingPlaylist) {
14 const hlsDirectory = getLiveDirectory(video) 14 const hlsDirectory = getLiveDirectory(video)
15 15
16 await cleanupTMPLiveFiles(hlsDirectory) 16 await cleanupTMPLiveFiles(hlsDirectory)
17 17
18 if (streamingPlaylist) await streamingPlaylist.destroy() 18 await streamingPlaylist.destroy()
19} 19}
20 20
21async function cleanupNormalLive (video: MVideo, streamingPlaylist?: MStreamingPlaylist) { 21async function cleanupUnsavedNormalLive (video: MVideo, streamingPlaylist: MStreamingPlaylist) {
22 const hlsDirectory = getLiveDirectory(video) 22 const hlsDirectory = getLiveDirectory(video)
23 23
24 await remove(hlsDirectory) 24 await remove(hlsDirectory)
25 25
26 if (streamingPlaylist) await streamingPlaylist.destroy() 26 await streamingPlaylist.destroy()
27} 27}
28 28
29async function cleanupTMPLiveFiles (hlsDirectory: string) { 29async function cleanupTMPLiveFiles (hlsDirectory: string) {
@@ -49,7 +49,7 @@ async function cleanupTMPLiveFiles (hlsDirectory: string) {
49 49
50export { 50export {
51 cleanupPermanentLive, 51 cleanupPermanentLive,
52 cleanupNormalLive, 52 cleanupUnsavedNormalLive,
53 cleanupTMPLiveFiles, 53 cleanupTMPLiveFiles,
54 buildConcatenatedName 54 buildConcatenatedName
55} 55}