diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-23 10:29:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-23 10:30:48 +0200 |
commit | 53023be33af420675d0060eb95c99a8038457564 (patch) | |
tree | 699a13694b0c1c8589d10de95184708a451fcab4 /server/lib/live/live-utils.ts | |
parent | 50341c8fe988ca2a3d7c700f9aa918673dc979c2 (diff) | |
download | PeerTube-53023be33af420675d0060eb95c99a8038457564.tar.gz PeerTube-53023be33af420675d0060eb95c99a8038457564.tar.zst PeerTube-53023be33af420675d0060eb95c99a8038457564.zip |
Fix fast restream in saved permanent live
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 | } |