aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/lib/job-queue/handlers/video-live-ending.ts15
1 files changed, 3 insertions, 12 deletions
diff --git a/server/lib/job-queue/handlers/video-live-ending.ts b/server/lib/job-queue/handlers/video-live-ending.ts
index 6a675b0ef..93d925830 100644
--- a/server/lib/job-queue/handlers/video-live-ending.ts
+++ b/server/lib/job-queue/handlers/video-live-ending.ts
@@ -69,18 +69,9 @@ async function saveLive (video: MVideo, live: MVideoLive) {
69 69
70 const rootFiles = await readdir(hlsDirectory) 70 const rootFiles = await readdir(hlsDirectory)
71 71
72 const playlistFiles: string[] = [] 72 const playlistFiles = rootFiles.filter(file => {
73 73 return file.endsWith('.m3u8') && file !== 'master.m3u8'
74 for (const file of rootFiles) { 74 })
75 // Move remaining files in the replay directory
76 if (file.endsWith('.ts')) {
77 await LiveManager.Instance.addSegmentToReplay(hlsDirectory, join(hlsDirectory, file))
78 }
79
80 if (file.endsWith('.m3u8') && file !== 'master.m3u8') {
81 playlistFiles.push(file)
82 }
83 }
84 75
85 await cleanupLiveFiles(hlsDirectory) 76 await cleanupLiveFiles(hlsDirectory)
86 77