aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/live/live-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/live/live-utils.ts')
-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}