From fc7548a68b27103cd83b70db4e13a6711863e58b Mon Sep 17 00:00:00 2001 From: himanshu8443 Date: Mon, 23 Jun 2025 16:40:32 +0530 Subject: [PATCH] fix: update getStream function to handle response URL for redirects --- dist/dooflix/stream.js | 4 +++- providers/dooflix/stream.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/dooflix/stream.js b/dist/dooflix/stream.js index 257e837..62b7211 100644 --- a/dist/dooflix/stream.js +++ b/dist/dooflix/stream.js @@ -23,13 +23,15 @@ const getStream = function (_a) { Cookie: "cf_clearance=M2_2Hy4lKRy_ruRX3dzOgm3iho1FHe2DUC1lq28BUtI-1737377622-1.2.1.1-6R8RaH94._H2BuNuotsjTZ3fAF6cLwPII0guemu9A5Xa46lpCJPuELycojdREwoonYS2kRTYcZ9_1c4h4epi2LtDvMM9jIoOZKE9pIdWa30peM1hRMpvffTjGUCraHsJNCJez8S_QZ6XkkdP7GeQ5iwiYaI6Grp6qSJWoq0Hj8lS7EITZ1LzyrALI6iLlYjgLmgLGa1VuhORWJBN8ZxrJIZ_ba_pqbrR9fjnyToqxZ0XQaZfk1d3rZyNWoZUjI98GoAxVjnKtcBQQG6b2jYPJuMbbYraGoa54N7E7BR__7o", }, }); - // if 300 get redirect link if (response.status >= 300 && response.status < 400) { const redirectLink = response.headers.get("Location"); if (redirectLink) { link = redirectLink; } } + if (response.url) { + link = response.url; + } streams.push({ server: "Dooflix", link: link, diff --git a/providers/dooflix/stream.ts b/providers/dooflix/stream.ts index 75ab724..d1d87f3 100644 --- a/providers/dooflix/stream.ts +++ b/providers/dooflix/stream.ts @@ -18,13 +18,16 @@ export const getStream = async function ({ "cf_clearance=M2_2Hy4lKRy_ruRX3dzOgm3iho1FHe2DUC1lq28BUtI-1737377622-1.2.1.1-6R8RaH94._H2BuNuotsjTZ3fAF6cLwPII0guemu9A5Xa46lpCJPuELycojdREwoonYS2kRTYcZ9_1c4h4epi2LtDvMM9jIoOZKE9pIdWa30peM1hRMpvffTjGUCraHsJNCJez8S_QZ6XkkdP7GeQ5iwiYaI6Grp6qSJWoq0Hj8lS7EITZ1LzyrALI6iLlYjgLmgLGa1VuhORWJBN8ZxrJIZ_ba_pqbrR9fjnyToqxZ0XQaZfk1d3rZyNWoZUjI98GoAxVjnKtcBQQG6b2jYPJuMbbYraGoa54N7E7BR__7o", }, }); - // if 300 get redirect link + if (response.status >= 300 && response.status < 400) { const redirectLink = response.headers.get("Location"); if (redirectLink) { link = redirectLink; } } + if (response.url) { + link = response.url; + } streams.push({ server: "Dooflix",