]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/hls.ts
Fix build
[github/Chocobozzz/PeerTube.git] / server / lib / hls.ts
index f541dd5d1cc49bde6c669b89138ea4ae22c34251..1574ff27bac29401a2e5731a9f3804819ca9cf8a 100644 (file)
@@ -2,7 +2,7 @@ import { close, ensureDir, move, open, outputJSON, read, readFile, remove, stat,
 import { flatten, uniq } from 'lodash'
 import { basename, dirname, join } from 'path'
 import { MStreamingPlaylistFilesVideo, MVideo, MVideoUUID } from '@server/types/models'
-import { sha256 } from '../helpers/core-utils'
+import { sha256 } from '@shared/extra-utils'
 import { getAudioStreamCodec, getVideoStreamCodec, getVideoStreamSize } from '../helpers/ffprobe-utils'
 import { logger } from '../helpers/logger'
 import { doRequest, doRequestAndSaveToFile } from '../helpers/requests'
@@ -130,7 +130,7 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string,
       for (const fileUrl of fileUrls) {
         const destPath = join(tmpDirectory, basename(fileUrl))
 
-        await doRequestAndSaveToFile(fileUrl, destPath, { bodyKBLimit: remainingBodyKBLimit, timeout: REQUEST_TIMEOUTS.FILE })
+        await doRequestAndSaveToFile(fileUrl, destPath, { bodyKBLimit: remainingBodyKBLimit, timeout: REQUEST_TIMEOUTS.REDUNDANCY })
 
         const { size } = await stat(destPath)
         remainingBodyKBLimit -= (size / 1000)