aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/hls.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/hls.ts')
-rw-r--r--server/lib/hls.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/hls.ts b/server/lib/hls.ts
index 05be403f3..212bd095b 100644
--- a/server/lib/hls.ts
+++ b/server/lib/hls.ts
@@ -36,8 +36,10 @@ async function updateMasterHLSPlaylist (video: MVideoWithFile) {
36 const streamingPlaylist = video.getHLSPlaylist() 36 const streamingPlaylist = video.getHLSPlaylist()
37 37
38 for (const file of streamingPlaylist.VideoFiles) { 38 for (const file of streamingPlaylist.VideoFiles) {
39 const playlistFilename = VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution)
40
39 // If we did not generated a playlist for this resolution, skip 41 // If we did not generated a playlist for this resolution, skip
40 const filePlaylistPath = join(directory, VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution)) 42 const filePlaylistPath = join(directory, playlistFilename)
41 if (await pathExists(filePlaylistPath) === false) continue 43 if (await pathExists(filePlaylistPath) === false) continue
42 44
43 const videoFilePath = getVideoFilePath(streamingPlaylist, file) 45 const videoFilePath = getVideoFilePath(streamingPlaylist, file)
@@ -58,7 +60,7 @@ async function updateMasterHLSPlaylist (video: MVideoWithFile) {
58 line += `,CODECS="${codecs.filter(c => !!c).join(',')}"` 60 line += `,CODECS="${codecs.filter(c => !!c).join(',')}"`
59 61
60 masterPlaylists.push(line) 62 masterPlaylists.push(line)
61 masterPlaylists.push(VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution)) 63 masterPlaylists.push(playlistFilename)
62 } 64 }
63 65
64 await writeFile(masterPlaylistPath, masterPlaylists.join('\n') + '\n') 66 await writeFile(masterPlaylistPath, masterPlaylists.join('\n') + '\n')