From f80d79070e4c849fb66c1e21ad2009644a26cec1 Mon Sep 17 00:00:00 2001 From: cloud <62519659+lem6ns@users.noreply.github.com> Date: Sun, 21 May 2023 11:46:10 -0700 Subject: [PATCH] refactor: use mwFetch instead of proxiedFetch --- src/backend/providers/flixhq.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/providers/flixhq.ts b/src/backend/providers/flixhq.ts index f0bf9f98..376abd08 100644 --- a/src/backend/providers/flixhq.ts +++ b/src/backend/providers/flixhq.ts @@ -4,7 +4,7 @@ import { getMWCaptionTypeFromUrl, isSupportedSubtitle, } from "../helpers/captions"; -import { proxiedFetch } from "../helpers/fetch"; +import { mwFetch } from "../helpers/fetch"; import { registerProvider } from "../helpers/register"; import { MWCaption, MWStreamQuality, MWStreamType } from "../helpers/streams"; import { MWMediaType } from "../metadata/types"; @@ -59,7 +59,7 @@ registerProvider({ throw new Error("Unsupported type"); } // search for relevant item - const searchResults = await proxiedFetch( + const searchResults = await mwFetch( `/${encodeURIComponent(media.meta.title)}`, { baseURL: flixHqBase, @@ -79,7 +79,7 @@ registerProvider({ // get media info progress(25); - const mediaInfo = await proxiedFetch(`/info/${foundItem.id}`, { + const mediaInfo = await mwFetch(`/info/${foundItem.id}`, { baseURL: flixHqBase, params: { type: flixTypeToMWType(foundItem.type), @@ -103,7 +103,7 @@ registerProvider({ } if (!episodeId) throw new Error("No watchable item found"); progress(75); - const watchInfo = await proxiedFetch(`/watch/${episodeId}`, { + const watchInfo = await mwFetch(`/watch/${episodeId}`, { baseURL: flixHqBase, params: { id: mediaInfo.id,