From 90fd314d822a0bf2a381a18eb7e4e52fc2c6e166 Mon Sep 17 00:00:00 2001 From: himanshu8443 Date: Wed, 9 Jul 2025 23:21:03 +0530 Subject: [PATCH] fix: correct conditional check for cinemalux in getEpisodes function --- dist/cinemaLuxe/episodes.js | 14 +++++++------- providers/cinemaLuxe/episodes.ts | 16 +++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/dist/cinemaLuxe/episodes.js b/dist/cinemaLuxe/episodes.js index 1216d3e..ae8fc2d 100644 --- a/dist/cinemaLuxe/episodes.js +++ b/dist/cinemaLuxe/episodes.js @@ -14,7 +14,7 @@ const getEpisodes = function (_a) { return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) { var _b; try { - if (!url.includes("luxelinks") || url.includes("luxecinema")) { + if (!url.includes("luxelinks") || url.includes("cinemalux")) { const res = yield providerContext.axios.get(url, { headers: providerContext.commonHeaders, }); @@ -35,19 +35,19 @@ const getEpisodes = function (_a) { url = (redirectUrl === null || redirectUrl === void 0 ? void 0 : redirectUrl.redirectUrl) || url; } } - const res = yield providerContext.axios.get(url, { - headers: providerContext.commonHeaders, - }); - const html = res.data; - let $ = providerContext.cheerio.load(html); const episodeLinks = []; - if (url.includes("luxedrive")) { + if (url.includes("luxedrive") || url.includes("drive.linkstore")) { episodeLinks.push({ title: "Movie", link: url, }); return episodeLinks; } + const res = yield providerContext.axios.get(url, { + headers: providerContext.commonHeaders, + }); + const html = res.data; + let $ = providerContext.cheerio.load(html); $("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map((i, element) => { var _a; const title = (_a = $(element).text()) === null || _a === void 0 ? void 0 : _a.trim(); diff --git a/providers/cinemaLuxe/episodes.ts b/providers/cinemaLuxe/episodes.ts index e6ba530..d86088c 100644 --- a/providers/cinemaLuxe/episodes.ts +++ b/providers/cinemaLuxe/episodes.ts @@ -8,7 +8,7 @@ export const getEpisodes = async function ({ providerContext: ProviderContext; }): Promise { try { - if (!url.includes("luxelinks") || url.includes("luxecinema")) { + if (!url.includes("luxelinks") || url.includes("cinemalux")) { const res = await providerContext.axios.get(url, { headers: providerContext.commonHeaders, }); @@ -31,19 +31,21 @@ export const getEpisodes = async function ({ url = redirectUrl?.redirectUrl || url; } } - const res = await providerContext.axios.get(url, { - headers: providerContext.commonHeaders, - }); - const html = res.data; - let $ = providerContext.cheerio.load(html); const episodeLinks: EpisodeLink[] = []; - if (url.includes("luxedrive")) { + + if (url.includes("luxedrive") || url.includes("drive.linkstore")) { episodeLinks.push({ title: "Movie", link: url, }); return episodeLinks; } + const res = await providerContext.axios.get(url, { + headers: providerContext.commonHeaders, + }); + const html = res.data; + let $ = providerContext.cheerio.load(html); + $("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map( (i, element) => { const title = $(element).text()?.trim();