From db4b15f21fbf4e33434e930ffc7fb768cdcf9d42 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 8 Mar 2021 14:24:11 +0100 Subject: Use got instead of request --- server/lib/hls.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib/hls.ts') diff --git a/server/lib/hls.ts b/server/lib/hls.ts index 04187668c..84539e2c1 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts @@ -135,7 +135,7 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string, const destPath = join(tmpDirectory, basename(fileUrl)) const bodyKBLimit = 10 * 1000 * 1000 // 10GB - await doRequestAndSaveToFile({ uri: fileUrl }, destPath, bodyKBLimit) + await doRequestAndSaveToFile(fileUrl, destPath, { bodyKBLimit }) } clearTimeout(timer) @@ -156,7 +156,7 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string, } async function fetchUniqUrls (playlistUrl: string) { - const { body } = await doRequest({ uri: playlistUrl }) + const { body } = await doRequest(playlistUrl) if (!body) return [] -- cgit v1.2.3