mirror of
https://github.com/sussy-code/providers.git
synced 2026-01-11 20:10:17 +00:00
Enable Autoembed English embed only
This commit is contained in:
parent
1b0eafcca7
commit
bba6699de3
2 changed files with 8 additions and 7 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue