Update ashi/ashi.js

This commit is contained in:
aka paul 2025-12-06 21:30:32 +00:00
parent 7a9d4f46b1
commit dfbf63eb10

View file

@ -542,13 +542,14 @@ async function extractStreamUrl(url) {
const streams = []; const streams = [];
const subStream = decryptedSub ? await getStream(decryptedSub.replace("megaup22", "megaup.site")) : null; const [subStream, dubStream, rawStream] = await Promise.all([
decryptedSub ? getStream(decryptedSub) : Promise.resolve(null),
decryptedDub ? getStream(decryptedDub) : Promise.resolve(null),
decryptedRaw ? getStream(decryptedRaw) : Promise.resolve(null)
]);
if (subStream) streams.push("Hardsub English", subStream); if (subStream) streams.push("Hardsub English", subStream);
const dubStream = decryptedDub ? await getStream(decryptedDub.replace("megaup22", "megaup.site")) : null;
if (dubStream) streams.push("Dubbed English", dubStream); if (dubStream) streams.push("Dubbed English", dubStream);
const rawStream = decryptedRaw ? await getStream(decryptedRaw.replace("megaup22", "megaup.site")) : null;
if (rawStream) streams.push("Original audio", rawStream); if (rawStream) streams.push("Original audio", rawStream);
const final = { const final = {
@ -666,14 +667,19 @@ async function extractStreamUrl(url) {
"Useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36" "Useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
}; };
const [finalJson, m3u8Text] = await Promise.all([
fetchv2("https://ilovekai.simplepostrequest.workers.dev/iloveass", {}, "POST", JSON.stringify(postData)).then(r => r.json()),
(async () => {
const finalResponse = await fetchv2("https://ilovekai.simplepostrequest.workers.dev/iloveass", {}, "POST", JSON.stringify(postData)); const finalResponse = await fetchv2("https://ilovekai.simplepostrequest.workers.dev/iloveass", {}, "POST", JSON.stringify(postData));
const finalJson = await finalResponse.json(); const finalJson = await finalResponse.json();
const m3u8Link = finalJson?.result?.sources?.[0]?.file;
const m3u8Response = await fetchv2(m3u8Link);
return m3u8Response.text();
})()
]);
const m3u8Link = finalJson?.result?.sources?.[0]?.file; const m3u8Link = finalJson?.result?.sources?.[0]?.file;
const m3u8Response = await fetchv2(m3u8Link);
const m3u8Text = await m3u8Response.text();
const baseUrl = m3u8Link.substring(0, m3u8Link.lastIndexOf('/') + 1); const baseUrl = m3u8Link.substring(0, m3u8Link.lastIndexOf('/') + 1);
const streams = []; const streams = [];