From 92155b0a60ec1c412cad53b8134c5717ee0b1931 Mon Sep 17 00:00:00 2001 From: Stefan Cruz <17972991+stefancruz@users.noreply.github.com> Date: Fri, 7 Jun 2024 00:59:58 +0100 Subject: [PATCH] perf: remove function to pre-check HLS --- src/DailymotionScript.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/DailymotionScript.ts b/src/DailymotionScript.ts index a8567e7..0848a88 100644 --- a/src/DailymotionScript.ts +++ b/src/DailymotionScript.ts @@ -881,14 +881,6 @@ function getSearchPagerAll(contextQuery): VideoPager { return new SearchPagerAll(results, videoConnection?.pageInfo?.hasNextPage, params, context.page, getSearchPagerAll); } -function checkHLS(url, headersToAdd, usePlatformAuth = false) { - // const resp = http.GET(url, headersToAdd, true); - var resp = getHttpContext({ usePlatformAuth }).GET(url, headersToAdd, usePlatformAuth); - - if (!resp.isOk) { - throw new UnavailableException('This content is not available') - } -} function getSavedVideo(url, usePlatformAuth = false) { @@ -937,8 +929,6 @@ function getSavedVideo(url, usePlatformAuth = false) { const hls_url = player_metadata?.qualities?.auto[0]?.url; - checkHLS(hls_url, headers1); - const videoDetailsRequestHeaders = { "Content-Type": "application/json", "User-Agent": USER_AGENT, -- GitLab