Enable Autoembed English embed only

This commit is contained in:
TPN 2025-01-08 16:40:48 +05:30 committed by GitHub
parent 1b0eafcca7
commit bba6699de3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 7 deletions

View file

@ -9,25 +9,30 @@ const providers = [
{
id: 'autoembed-hindi',
rank: 9,
disabled: true,
},
{
id: 'autoembed-tamil',
rank: 8,
disabled: true,
},
{
id: 'autoembed-telugu',
rank: 7,
disabled: true,
},
{
id: 'autoembed-bengali',
rank: 6,
disabled: true,
},
];
function embed(provider: { id: string; rank: number }) {
function embed(provider: { id: string; rank: number; disabled?: boolean }) {
return makeEmbed({
id: provider.id,
name: provider.id.charAt(0).toUpperCase() + provider.id.slice(1),
name: provider.id.split('-').map(word => word[0].toUpperCase() + word.slice(1)).join(' '),
disabled: provider.disabled,
rank: provider.rank,
async scrape(ctx) {
return {

View file

@ -27,11 +27,7 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
for (const stream of fileData) {
const url = stream.file;
if (!url) continue;
const lang = stream.title.toLowerCase().trim();
// only return english
if (lang.includes('english') && url) {
embeds.push({ embedId: `autoembed-${lang}`, url });
}
embeds.push({ embedId: `autoembed-${stream.title.toLowerCase().trim()}`, url });
}
return {