X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fhls.ts;h=04187668c7afd4f2b24b8a50da8dad624c112edd;hb=095e2258043fcff8a79ab082d11edfbd8f13a8e2;hp=9ea83f33762f5a5658b7c8ebc5b6748ac1b57568;hpb=daf6e4801052d3ca6be2fafd20bae2323b1ce175;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/hls.ts b/server/lib/hls.ts index 9ea83f337..04187668c 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts @@ -12,7 +12,7 @@ import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION } from import { sequelizeTypescript } from '../initializers/database' import { VideoFileModel } from '../models/video/video-file' import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' -import { getVideoFilename, getVideoFilePath } from './video-paths' +import { getVideoFilePath } from './video-paths' async function updateStreamingPlaylistsInfohashesIfNeeded () { const playlistsToUpdate = await VideoStreamingPlaylistModel.listByIncorrectPeerVersion() @@ -93,7 +93,7 @@ async function updateSha256VODSegments (video: MVideoWithFile) { } await close(fd) - const videoFilename = getVideoFilename(hlsPlaylist, file) + const videoFilename = file.filename json[videoFilename] = rangeHashes } @@ -111,7 +111,7 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string, logger.info('Importing HLS playlist %s', playlistUrl) - return new Promise(async (res, rej) => { + return new Promise(async (res, rej) => { const tmpDirectory = join(CONFIG.STORAGE.TMP_DIR, await generateRandomString(10)) await ensureDir(tmpDirectory)