From e126970047fc3ae039bbc2aa23934a8c3c1967a6 Mon Sep 17 00:00:00 2001 From: GSTAR <44748406+GLlgGL@users.noreply.github.com> Date: Wed, 15 Oct 2025 18:40:33 +0200 Subject: [PATCH] Update Kokoshka.ts There are some old dodo domains like d-s.io which fail to load the stream, so instead after fetching the link I replaced it with working domain like dsvplay.com --- src/source/Kokoshka.ts | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/source/Kokoshka.ts b/src/source/Kokoshka.ts index babe493..f7ce030 100644 --- a/src/source/Kokoshka.ts +++ b/src/source/Kokoshka.ts @@ -79,9 +79,15 @@ export class Kokoshka extends Source { if (json.embed_url) urls.push(json.embed_url); if (Array.isArray(json.sources)) urls.push(...json.sources.map((s: any) => s.file)); - for (const embed of urls) { - const cleaned = embed.replace(/\\/g, '').replace(/^http:/, 'https:'); - const url = new URL(cleaned); + for (let embed of urls) { + embed = embed.replace(/\\/g, '').replace(/^http:/, 'https:'); + + // --- Replace Dodo domain --- + if (embed.startsWith('https://d-s.io/')) { + embed = embed.replace('https://d-s.io/e/', 'https://dsvplay.com/e/'); + } + + const url = new URL(embed); if (await testUrl(url)) { results.push({ url, @@ -111,9 +117,15 @@ export class Kokoshka extends Source { if (json.embed_url) urls.push(json.embed_url); if (Array.isArray(json.sources)) urls.push(...json.sources.map((s: any) => s.file)); - for (const embed of urls) { - const cleaned = embed.replace(/\\/g, '').replace(/^http:/, 'https:'); - const url = new URL(cleaned); + for (let embed of urls) { + embed = embed.replace(/\\/g, '').replace(/^http:/, 'https:'); + + // --- Replace Dodo domain --- + if (embed.startsWith('https://d-s.io/')) { + embed = embed.replace('https://d-s.io/e/', 'https://dsvplay.com/e/'); + } + + const url = new URL(embed); if (await testUrl(url)) { results.push({ url, @@ -133,4 +145,4 @@ export class Kokoshka extends Source { return []; } } -} +} \ No newline at end of file