From 554e323ddeb644f05bbdd586830c4f7fecd301c4 Mon Sep 17 00:00:00 2001 From: JMcrafter26 <77780772+JMcrafter26@users.noreply.github.com> Date: Fri, 30 Jan 2026 23:51:26 +0100 Subject: [PATCH] fix: Improve movie link detection --- s.to/sToEngDub.json | 2 +- s.to/sToEngDub_v2.js | 8 +++++--- s.to/sToGerDub.json | 2 +- s.to/sToGerDub_v2.js | 8 +++++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/s.to/sToEngDub.json b/s.to/sToEngDub.json index 63672a3..fb2c639 100644 --- a/s.to/sToEngDub.json +++ b/s.to/sToEngDub.json @@ -6,7 +6,7 @@ "icon": "https://files.catbox.moe/ttj4fc.gif", "url": "https://github.com/JMcrafter26" }, - "version": "0.4.0", + "version": "0.4.1", "language": "English (DUB)", "streamType": "HLS", "quality": "720p", diff --git a/s.to/sToEngDub_v2.js b/s.to/sToEngDub_v2.js index ef373be..a3456df 100644 --- a/s.to/sToEngDub_v2.js +++ b/s.to/sToEngDub_v2.js @@ -91,13 +91,13 @@ async function extractEpisodes(url) { const finishedList = []; const seasonLinks = getSeasonLinks(html); - console.log("Season Links: " + JSON.stringify(seasonLinks)); + sendLog("Season Links: " + JSON.stringify(seasonLinks)); for (const seasonLink of seasonLinks) { const seasonEpisodes = await fetchSeasonEpisodes(`${seasonLink}`); finishedList.push(...seasonEpisodes); } - console.log("Finished Episode List: " + JSON.stringify(finishedList)); + sendLog("Finished Episode List: " + JSON.stringify(finishedList)); return JSON.stringify(finishedList); @@ -112,6 +112,7 @@ async function extractEpisodes(url) { async function extractStreamUrl(url) { 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 fetchUrl = `${url}`; @@ -234,7 +235,8 @@ function getSeasonLinks(html) { const filmeLinks = []; while ((seasonLinkMatch = seasonLinkRegex.exec(seasonList)) !== null) { 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); } else { seasonLinks.push(seasonLink); diff --git a/s.to/sToGerDub.json b/s.to/sToGerDub.json index 2550bd59..5d41dd7 100644 --- a/s.to/sToGerDub.json +++ b/s.to/sToGerDub.json @@ -6,7 +6,7 @@ "icon": "https://files.catbox.moe/ttj4fc.gif", "url": "https://github.com/JMcrafter26" }, - "version": "0.4.0", + "version": "0.4.1", "language": "German (DUB)", "streamType": "HLS", "quality": "720p", diff --git a/s.to/sToGerDub_v2.js b/s.to/sToGerDub_v2.js index b95be25..9a9b8ae 100644 --- a/s.to/sToGerDub_v2.js +++ b/s.to/sToGerDub_v2.js @@ -91,13 +91,13 @@ async function extractEpisodes(url) { const finishedList = []; const seasonLinks = getSeasonLinks(html); - console.log("Season Links: " + JSON.stringify(seasonLinks)); + sendLog("Season Links: " + JSON.stringify(seasonLinks)); for (const seasonLink of seasonLinks) { const seasonEpisodes = await fetchSeasonEpisodes(`${seasonLink}`); finishedList.push(...seasonEpisodes); } - console.log("Finished Episode List: " + JSON.stringify(finishedList)); + sendLog("Finished Episode List: " + JSON.stringify(finishedList)); return JSON.stringify(finishedList); @@ -112,6 +112,7 @@ async function extractEpisodes(url) { async function extractStreamUrl(url) { 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 fetchUrl = `${url}`; @@ -234,7 +235,8 @@ function getSeasonLinks(html) { const filmeLinks = []; while ((seasonLinkMatch = seasonLinkRegex.exec(seasonList)) !== null) { 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); } else { seasonLinks.push(seasonLink);