adjust vidsrcsu embed ranks

This commit is contained in:
Pas 2025-02-01 14:32:14 -07:00
parent ada152efd3
commit 2ab64b6d1b
3 changed files with 21 additions and 11 deletions

View file

@ -64,6 +64,7 @@ import {
VidsrcsuServer11Scraper,
VidsrcsuServer12Scraper,
VidsrcsuServer1Scraper,
VidsrcsuServer20Scraper,
VidsrcsuServer2Scraper,
VidsrcsuServer3Scraper,
VidsrcsuServer4Scraper,
@ -191,6 +192,7 @@ export function gatherAllEmbeds(): Array<Embed> {
VidsrcsuServer10Scraper,
VidsrcsuServer11Scraper,
VidsrcsuServer12Scraper,
VidsrcsuServer20Scraper,
webtor4kScraper,
webtor1080Scraper,
webtor720Scraper,

View file

@ -2,10 +2,6 @@ import { flags } from '@/entrypoint/utils/targets';
import { makeEmbed } from '@/providers/base';
const providers = [
{
id: 'server-12',
rank: 112,
},
{
id: 'server-7',
rank: 102,
@ -48,17 +44,28 @@ const providers = [
},
{
id: 'server-9',
rank: 2,
rank: 6,
},
{
id: 'server-12',
rank: 3,
},
{
id: 'server-20',
rank: 1,
name: 'Cineby',
},
];
function embed(provider: { id: string; rank: number; disabled?: boolean }) {
function embed(provider: { id: string; rank: number; name?: string; disabled?: boolean }) {
return makeEmbed({
id: provider.id,
name: provider.id
.split('-')
.map((word) => word[0].toUpperCase() + word.slice(1))
.join(' '),
name:
provider.name ||
provider.id
.split('-')
.map((word) => word[0].toUpperCase() + word.slice(1))
.join(' '),
disabled: provider.disabled,
rank: provider.rank,
async scrape(ctx) {
@ -90,4 +97,5 @@ export const [
VidsrcsuServer10Scraper,
VidsrcsuServer11Scraper,
VidsrcsuServer12Scraper,
VidsrcsuServer20Scraper,
] = providers.map(embed);

View file

@ -20,7 +20,7 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
if (decodedPeterUrl) {
servers.push({
serverNumber: 12,
serverNumber: 20,
url: decodedPeterUrl,
});
}