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.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/hls.ts b/server/lib/hls.ts
index 8160e7949..d969549b8 100644
--- a/server/lib/hls.ts
+++ b/server/lib/hls.ts
@@ -37,7 +37,7 @@ async function updateMasterHLSPlaylist (video: MVideo, playlist: MStreamingPlayl
37 for (const file of playlist.VideoFiles) { 37 for (const file of playlist.VideoFiles) {
38 const playlistFilename = getHlsResolutionPlaylistFilename(file.filename) 38 const playlistFilename = getHlsResolutionPlaylistFilename(file.filename)
39 39
40 await VideoPathManager.Instance.makeAvailableVideoFile(playlist, file, async videoFilePath => { 40 await VideoPathManager.Instance.makeAvailableVideoFile(file.withVideoOrPlaylist(playlist), async videoFilePath => {
41 const size = await getVideoStreamSize(videoFilePath) 41 const size = await getVideoStreamSize(videoFilePath)
42 42
43 const bandwidth = 'BANDWIDTH=' + video.getBandwidthBits(file) 43 const bandwidth = 'BANDWIDTH=' + video.getBandwidthBits(file)
@@ -69,10 +69,11 @@ async function updateSha256VODSegments (video: MVideoUUID, playlist: MStreamingP
69 // For all the resolutions available for this video 69 // For all the resolutions available for this video
70 for (const file of playlist.VideoFiles) { 70 for (const file of playlist.VideoFiles) {
71 const rangeHashes: { [range: string]: string } = {} 71 const rangeHashes: { [range: string]: string } = {}
72 const fileWithPlaylist = file.withVideoOrPlaylist(playlist)
72 73
73 await VideoPathManager.Instance.makeAvailableVideoFile(playlist, file, videoPath => { 74 await VideoPathManager.Instance.makeAvailableVideoFile(fileWithPlaylist, videoPath => {
74 75
75 return VideoPathManager.Instance.makeAvailableResolutionPlaylistFile(playlist, file, async resolutionPlaylistPath => { 76 return VideoPathManager.Instance.makeAvailableResolutionPlaylistFile(fileWithPlaylist, async resolutionPlaylistPath => {
76 const playlistContent = await readFile(resolutionPlaylistPath) 77 const playlistContent = await readFile(resolutionPlaylistPath)
77 const ranges = getRangesFromPlaylist(playlistContent.toString()) 78 const ranges = getRangesFromPlaylist(playlistContent.toString())
78 79