mirror of
https://github.com/sussy-code/providers.git
synced 2026-04-21 00:22:07 +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',
|
id: 'autoembed-hindi',
|
||||||
rank: 9,
|
rank: 9,
|
||||||
|
disabled: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'autoembed-tamil',
|
id: 'autoembed-tamil',
|
||||||
rank: 8,
|
rank: 8,
|
||||||
|
disabled: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'autoembed-telugu',
|
id: 'autoembed-telugu',
|
||||||
rank: 7,
|
rank: 7,
|
||||||
|
disabled: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'autoembed-bengali',
|
id: 'autoembed-bengali',
|
||||||
rank: 6,
|
rank: 6,
|
||||||
|
disabled: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
function embed(provider: { id: string; rank: number }) {
|
function embed(provider: { id: string; rank: number; disabled?: boolean }) {
|
||||||
return makeEmbed({
|
return makeEmbed({
|
||||||
id: provider.id,
|
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,
|
rank: provider.rank,
|
||||||
async scrape(ctx) {
|
async scrape(ctx) {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,7 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
|
||||||
for (const stream of fileData) {
|
for (const stream of fileData) {
|
||||||
const url = stream.file;
|
const url = stream.file;
|
||||||
if (!url) continue;
|
if (!url) continue;
|
||||||
const lang = stream.title.toLowerCase().trim();
|
embeds.push({ embedId: `autoembed-${stream.title.toLowerCase().trim()}`, url });
|
||||||
// only return english
|
|
||||||
if (lang.includes('english') && url) {
|
|
||||||
embeds.push({ embedId: `autoembed-${lang}`, url });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue