diff options
Diffstat (limited to 'server/lib/live/live-utils.ts')
-rw-r--r-- | server/lib/live/live-utils.ts | 10 |
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 | ||
13 | async function cleanupPermanentLive (video: MVideo, streamingPlaylist?: MStreamingPlaylist) { | 13 | async 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 | ||
21 | async function cleanupNormalLive (video: MVideo, streamingPlaylist?: MStreamingPlaylist) { | 21 | async 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 | ||
29 | async function cleanupTMPLiveFiles (hlsDirectory: string) { | 29 | async function cleanupTMPLiveFiles (hlsDirectory: string) { |
@@ -49,7 +49,7 @@ async function cleanupTMPLiveFiles (hlsDirectory: string) { | |||
49 | 49 | ||
50 | export { | 50 | export { |
51 | cleanupPermanentLive, | 51 | cleanupPermanentLive, |
52 | cleanupNormalLive, | 52 | cleanupUnsavedNormalLive, |
53 | cleanupTMPLiveFiles, | 53 | cleanupTMPLiveFiles, |
54 | buildConcatenatedName | 54 | buildConcatenatedName |
55 | } | 55 | } |