Fix embedUrl matching for Vidplay and Filemoon sources

This commit is contained in:
Paradox-77
2024-03-14 22:45:19 +05:30
parent 147884a74c
commit fed8678ef1

View File

@@ -52,7 +52,7 @@ const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Pr
for (const source of sources.result) { for (const source of sources.result) {
if (source.title === 'Vidplay') { if (source.title === 'Vidplay') {
const embedUrl = embedUrls.find((v) => v.includes('vidplay')); const embedUrl = embedUrls.find((v) => v.match(/https:\/\/(?:[a-zA-Z0-9]{10})\./));
if (!embedUrl) continue; if (!embedUrl) continue;
embeds.push({ embeds.push({
embedId: 'vidplay', embedId: 'vidplay',
@@ -61,7 +61,7 @@ const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Pr
} }
if (source.title === 'Filemoon') { if (source.title === 'Filemoon') {
const embedUrl = embedUrls.find((v) => v.includes('filemoon')); const embedUrl = embedUrls.find((v) => v.includes('kerapoxy'));
if (!embedUrl) continue; if (!embedUrl) continue;
const fullUrl = new URL(embedUrl); const fullUrl = new URL(embedUrl);
if (subtitleUrl) fullUrl.searchParams.set('sub.info', subtitleUrl); if (subtitleUrl) fullUrl.searchParams.set('sub.info', subtitleUrl);