mirror of
https://github.com/p-stream/providers.git
synced 2026-04-20 00:32:05 +00:00
Add fendi
This commit is contained in:
parent
62a9597da7
commit
fdf0dd9941
4 changed files with 45 additions and 2 deletions
|
|
@ -79,6 +79,7 @@ import { warezPlayerScraper } from './embeds/warezcdn/warezplayer';
|
|||
import { webtor1080Scraper, webtor480Scraper, webtor4kScraper, webtor720Scraper } from './embeds/webtor';
|
||||
import {
|
||||
xprimeApolloEmbed,
|
||||
xprimeFendiEmbed,
|
||||
xprimeFoxEmbed,
|
||||
xprimeHarbourEmbed,
|
||||
xprimeMarantEmbed,
|
||||
|
|
@ -199,6 +200,7 @@ export function gatherAllEmbeds(): Array<Embed> {
|
|||
xprimeApolloEmbed,
|
||||
xprimeStreamboxEmbed,
|
||||
xprimeMarantEmbed,
|
||||
xprimeFendiEmbed,
|
||||
xprimePrimenetEmbed,
|
||||
xprimeVolkswagenEmbed,
|
||||
xprimeHarbourEmbed,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ const marantBaseUrl = 'https://backend.xprime.tv/marant';
|
|||
const primenetBaseUrl = 'https://backend.xprime.tv/primenet';
|
||||
const volkswagenBaseUrl = 'https://backend.xprime.tv/volkswagen';
|
||||
const harbourBaseUrl = 'https://backend.xprime.tv/harbour';
|
||||
const fendiBaseUrl = 'https://backend.xprime.tv/fendi';
|
||||
|
||||
const languageMap: Record<string, string> = {
|
||||
'chinese - hong kong': 'zh',
|
||||
|
|
@ -361,10 +362,44 @@ export const xprimeHarbourEmbed = makeEmbed({
|
|||
},
|
||||
});
|
||||
|
||||
export const xprimeFendiEmbed = makeEmbed({
|
||||
id: 'xprime-fendi',
|
||||
name: 'Fendi',
|
||||
rank: 231,
|
||||
async scrape(ctx): Promise<EmbedOutput> {
|
||||
const query = JSON.parse(ctx.url);
|
||||
let url = `${fendiBaseUrl}?id=${query.tmdbId}`;
|
||||
|
||||
if (query.type === 'show') {
|
||||
url += `&season=${query.season}&episode=${query.episode}`;
|
||||
}
|
||||
|
||||
const data = await ctx.fetcher(url);
|
||||
|
||||
if (!data) throw new NotFoundError('No response received');
|
||||
if (data.error) throw new NotFoundError(data.error);
|
||||
if (!data.url) throw new NotFoundError('No stream URL found in response');
|
||||
|
||||
ctx.progress(90);
|
||||
|
||||
return {
|
||||
stream: [
|
||||
{
|
||||
type: 'hls',
|
||||
id: 'primary',
|
||||
playlist: data.url,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
captions: [],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
export const xprimeMarantEmbed = makeEmbed({
|
||||
id: 'xprime-marant',
|
||||
name: 'Marant (French + English)',
|
||||
rank: 231,
|
||||
rank: 230,
|
||||
async scrape(ctx): Promise<EmbedOutput> {
|
||||
const query = JSON.parse(ctx.url);
|
||||
let url = `${marantBaseUrl}?id=${query.tmdbId}`;
|
||||
|
|
@ -398,7 +433,7 @@ export const xprimeMarantEmbed = makeEmbed({
|
|||
export const xprimeVolkswagenEmbed = makeEmbed({
|
||||
id: 'xprime-volkswagen',
|
||||
name: 'Volkswagen (German)',
|
||||
rank: 230,
|
||||
rank: 229,
|
||||
async scrape(ctx): Promise<EmbedOutput> {
|
||||
const query = JSON.parse(ctx.url);
|
||||
let url = `${volkswagenBaseUrl}?name=${query.title}`;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
|
|||
embedId: 'xprime-fox',
|
||||
url: JSON.stringify(query),
|
||||
},
|
||||
{
|
||||
embedId: 'xprime-fendi',
|
||||
url: JSON.stringify(query),
|
||||
},
|
||||
{
|
||||
embedId: 'xprime-marant',
|
||||
url: JSON.stringify(query),
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import { viperScraper } from '@/providers/embeds/viper';
|
|||
import { warezcdnembedMp4Scraper } from '@/providers/embeds/warezcdn/mp4';
|
||||
import {
|
||||
xprimeApolloEmbed,
|
||||
xprimeFendiEmbed,
|
||||
xprimeFoxEmbed,
|
||||
xprimeHarbourEmbed,
|
||||
xprimeMarantEmbed,
|
||||
|
|
@ -69,6 +70,7 @@ const SKIP_VALIDATION_CHECK_IDS = [
|
|||
xprimeApolloEmbed.id,
|
||||
xprimeStreamboxEmbed.id,
|
||||
xprimeMarantEmbed.id,
|
||||
xprimeFendiEmbed.id,
|
||||
xprimePrimenetEmbed.id,
|
||||
xprimeVolkswagenEmbed.id,
|
||||
xprimeHarbourEmbed.id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue