fix: Improve movie link detection #8
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"icon": "https://files.catbox.moe/ttj4fc.gif",
|
"icon": "https://files.catbox.moe/ttj4fc.gif",
|
||||||
"url": "https://github.com/JMcrafter26"
|
"url": "https://github.com/JMcrafter26"
|
||||||
},
|
},
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"language": "English (DUB)",
|
"language": "English (DUB)",
|
||||||
"streamType": "HLS",
|
"streamType": "HLS",
|
||||||
"quality": "720p",
|
"quality": "720p",
|
||||||
|
|||||||
@@ -91,13 +91,13 @@ async function extractEpisodes(url) {
|
|||||||
|
|
||||||
const finishedList = [];
|
const finishedList = [];
|
||||||
const seasonLinks = getSeasonLinks(html);
|
const seasonLinks = getSeasonLinks(html);
|
||||||
console.log("Season Links: " + JSON.stringify(seasonLinks));
|
sendLog("Season Links: " + JSON.stringify(seasonLinks));
|
||||||
|
|
||||||
for (const seasonLink of seasonLinks) {
|
for (const seasonLink of seasonLinks) {
|
||||||
const seasonEpisodes = await fetchSeasonEpisodes(`${seasonLink}`);
|
const seasonEpisodes = await fetchSeasonEpisodes(`${seasonLink}`);
|
||||||
finishedList.push(...seasonEpisodes);
|
finishedList.push(...seasonEpisodes);
|
||||||
}
|
}
|
||||||
console.log("Finished Episode List: " + JSON.stringify(finishedList));
|
sendLog("Finished Episode List: " + JSON.stringify(finishedList));
|
||||||
|
|
||||||
|
|
||||||
return JSON.stringify(finishedList);
|
return JSON.stringify(finishedList);
|
||||||
@@ -112,6 +112,7 @@ async function extractEpisodes(url) {
|
|||||||
|
|
||||||
async function extractStreamUrl(url) {
|
async function extractStreamUrl(url) {
|
||||||
try {
|
try {
|
||||||
|
sendLog("ExtractStreamUrl called with URL: " + url);
|
||||||
const language = [2 ,4, 3]; // Prioritize languages: 1=Deutsch, 3=Ger-Sub, 2=Englisch, 4=Eng-Sub
|
const language = [2 ,4, 3]; // Prioritize languages: 1=Deutsch, 3=Ger-Sub, 2=Englisch, 4=Eng-Sub
|
||||||
|
|
||||||
const fetchUrl = `${url}`;
|
const fetchUrl = `${url}`;
|
||||||
@@ -234,7 +235,8 @@ function getSeasonLinks(html) {
|
|||||||
const filmeLinks = [];
|
const filmeLinks = [];
|
||||||
while ((seasonLinkMatch = seasonLinkRegex.exec(seasonList)) !== null) {
|
while ((seasonLinkMatch = seasonLinkRegex.exec(seasonList)) !== null) {
|
||||||
const [_, seasonLink] = seasonLinkMatch;
|
const [_, seasonLink] = seasonLinkMatch;
|
||||||
if (seasonLink.endsWith('/filme')) {
|
// ends with /filme or contains staffel-0
|
||||||
|
if (seasonLink.endsWith('/filme') || seasonLink.includes('staffel-0')) {
|
||||||
filmeLinks.push(seasonLink);
|
filmeLinks.push(seasonLink);
|
||||||
} else {
|
} else {
|
||||||
seasonLinks.push(seasonLink);
|
seasonLinks.push(seasonLink);
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"icon": "https://files.catbox.moe/ttj4fc.gif",
|
"icon": "https://files.catbox.moe/ttj4fc.gif",
|
||||||
"url": "https://github.com/JMcrafter26"
|
"url": "https://github.com/JMcrafter26"
|
||||||
},
|
},
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"language": "German (DUB)",
|
"language": "German (DUB)",
|
||||||
"streamType": "HLS",
|
"streamType": "HLS",
|
||||||
"quality": "720p",
|
"quality": "720p",
|
||||||
|
|||||||
@@ -91,13 +91,13 @@ async function extractEpisodes(url) {
|
|||||||
|
|
||||||
const finishedList = [];
|
const finishedList = [];
|
||||||
const seasonLinks = getSeasonLinks(html);
|
const seasonLinks = getSeasonLinks(html);
|
||||||
console.log("Season Links: " + JSON.stringify(seasonLinks));
|
sendLog("Season Links: " + JSON.stringify(seasonLinks));
|
||||||
|
|
||||||
for (const seasonLink of seasonLinks) {
|
for (const seasonLink of seasonLinks) {
|
||||||
const seasonEpisodes = await fetchSeasonEpisodes(`${seasonLink}`);
|
const seasonEpisodes = await fetchSeasonEpisodes(`${seasonLink}`);
|
||||||
finishedList.push(...seasonEpisodes);
|
finishedList.push(...seasonEpisodes);
|
||||||
}
|
}
|
||||||
console.log("Finished Episode List: " + JSON.stringify(finishedList));
|
sendLog("Finished Episode List: " + JSON.stringify(finishedList));
|
||||||
|
|
||||||
|
|
||||||
return JSON.stringify(finishedList);
|
return JSON.stringify(finishedList);
|
||||||
@@ -112,6 +112,7 @@ async function extractEpisodes(url) {
|
|||||||
|
|
||||||
async function extractStreamUrl(url) {
|
async function extractStreamUrl(url) {
|
||||||
try {
|
try {
|
||||||
|
sendLog("ExtractStreamUrl called with URL: " + url);
|
||||||
const language = [1, 3, 2 ,4]; // Prioritize languages: 1=Deutsch, 3=Ger-Sub, 2=Englisch, 4=Eng-Sub
|
const language = [1, 3, 2 ,4]; // Prioritize languages: 1=Deutsch, 3=Ger-Sub, 2=Englisch, 4=Eng-Sub
|
||||||
|
|
||||||
const fetchUrl = `${url}`;
|
const fetchUrl = `${url}`;
|
||||||
@@ -234,7 +235,8 @@ function getSeasonLinks(html) {
|
|||||||
const filmeLinks = [];
|
const filmeLinks = [];
|
||||||
while ((seasonLinkMatch = seasonLinkRegex.exec(seasonList)) !== null) {
|
while ((seasonLinkMatch = seasonLinkRegex.exec(seasonList)) !== null) {
|
||||||
const [_, seasonLink] = seasonLinkMatch;
|
const [_, seasonLink] = seasonLinkMatch;
|
||||||
if (seasonLink.endsWith('/filme')) {
|
// ends with /filme or contains staffel-0
|
||||||
|
if (seasonLink.endsWith('/filme') || seasonLink.includes('staffel-0')) {
|
||||||
filmeLinks.push(seasonLink);
|
filmeLinks.push(seasonLink);
|
||||||
} else {
|
} else {
|
||||||
seasonLinks.push(seasonLink);
|
seasonLinks.push(seasonLink);
|
||||||
|
|||||||
Reference in New Issue
Block a user