mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-22 13:46:29 +01:00
Update mapple/mapple.js
This commit is contained in:
parent
4279c1da72
commit
f49260a9c6
1 changed files with 4 additions and 3 deletions
|
|
@ -244,9 +244,10 @@ async function extractStreamUrl(ID) {
|
||||||
console.log("Session Data: " + JSON.stringify(sessionData));
|
console.log("Session Data: " + JSON.stringify(sessionData));
|
||||||
const sessionID = sessionData.result.sessionId || "N/A";
|
const sessionID = sessionData.result.sessionId || "N/A";
|
||||||
|
|
||||||
if (ID.startsWith('movie/')) {
|
if (ID.startsWith('/movie/') || ID.startsWith('movie/')) {
|
||||||
const match = ID.match(/movie\/(\d+)-/);
|
const match = ID.match(/movie\/(\d+)/);
|
||||||
const tmdbID = match ? match[1] : '';
|
const tmdbID = match ? match[1] : '';
|
||||||
|
console.log("Extracted TMDB ID: " + tmdbID);
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "text/plain",
|
"Content-Type": "text/plain",
|
||||||
"next-action": actionIdentifier
|
"next-action": actionIdentifier
|
||||||
|
|
@ -332,7 +333,7 @@ async function extractStreamUrl(ID) {
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Failed to extract stream URL");
|
throw new Error("Failed to extract stream URL");
|
||||||
}
|
}
|
||||||
} else if (ID.startsWith('tv/')) {
|
} else if (ID.startsWith('/tv/') || ID.startsWith('tv/')) {
|
||||||
const match = ID.match(/tv\/(\d+)-(\d+)-(\d+)/);
|
const match = ID.match(/tv\/(\d+)-(\d+)-(\d+)/);
|
||||||
if (!match) throw new Error("Invalid TV URL format");
|
if (!match) throw new Error("Invalid TV URL format");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue