From 15917c523ab80114e6ceed17d0e6a89beb59f921 Mon Sep 17 00:00:00 2001 From: Pas <74743263+Pasithea0@users.noreply.github.com> Date: Fri, 16 May 2025 16:48:10 -0600 Subject: [PATCH] Update streamwish.ts --- src/providers/embeds/streamwish.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/providers/embeds/streamwish.ts b/src/providers/embeds/streamwish.ts index d795708..e927e04 100644 --- a/src/providers/embeds/streamwish.ts +++ b/src/providers/embeds/streamwish.ts @@ -32,14 +32,17 @@ function embed(provider: { id: string; name: string; rank: number }) { const encodedUrl = encodeURIComponent(ctx.url); const apiUrl = `https://ws-m3u8.moonpic.qzz.io/m3u8/${encodedUrl}`; - const response = await ctx.proxiedFetcher<{ m3u8: string }>(apiUrl, { + const response = await fetch(apiUrl, { headers: { Accept: 'application/json', // 'ngrok-skip-browser-warning': 'true', // this header bypass ngrok warning }, }); - const videoUrl = response.m3u8; + if (!response.ok) throw new NotFoundError('No video URL found'); + const data = await response.json(); + + const videoUrl = data.m3u8; if (!videoUrl) throw new NotFoundError('No video URL found'); return {