mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-21 21:26:19 +01:00
Update 1movies/1movies.js
This commit is contained in:
parent
d5d75e5d5b
commit
1278afa3bf
1 changed files with 14 additions and 5 deletions
|
|
@ -197,13 +197,22 @@ async function extractStreamUrl(url) {
|
|||
const decryptedResponse = await decryptBatchResponse.json();
|
||||
const decryptedUrl = decryptedResponse[0]?.data.url;
|
||||
|
||||
const subListEncoded = decryptedUrl.split("sub.list=")[1]?.split("&")[0];
|
||||
const subListUrl = decodeURIComponent(subListEncoded);
|
||||
const subListEncoded = decryptedUrl.split("sub.list=")[1]?.split("&")[0];
|
||||
let subtitles = "N/A";
|
||||
|
||||
const subResponse = await fetchv2(subListUrl);
|
||||
const subtitles = await subResponse.json();
|
||||
if (subListEncoded) {
|
||||
try {
|
||||
const subListUrl = decodeURIComponent(subListEncoded);
|
||||
const subResponse = await fetchv2(subListUrl);
|
||||
subtitles = await subResponse.json();
|
||||
} catch {
|
||||
subtitles = "N/A";
|
||||
}
|
||||
}
|
||||
|
||||
const englishSubUrl = subtitles.find(sub => sub.label === "English")?.file.replace(/\\\//g, "/");
|
||||
const englishSubUrl = Array.isArray(subtitles)
|
||||
? subtitles.find(sub => sub.label === "English")?.file.replace(/\\\//g, "/")
|
||||
: "N/A";
|
||||
|
||||
if (!decryptedUrl) {
|
||||
console.log("Decryption failed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue