mirror of
https://github.com/p-stream/providers.git
synced 2026-04-21 00:52:27 +00:00
Fixed syntaxing more
This commit is contained in:
parent
35d61d19a2
commit
f3720161ac
2 changed files with 7 additions and 5 deletions
|
|
@ -37,7 +37,7 @@ export async function scrape(ctx: ScrapeContext, media: MovieMedia | ShowMedia,
|
||||||
if (media.type === 'movie') {
|
if (media.type === 'movie') {
|
||||||
id = result.id_movie;
|
id = result.id_movie;
|
||||||
} else if (media.type === 'show') {
|
} else if (media.type === 'show') {
|
||||||
const data = await ctx.fetcher<any>(`https://lmscript.xyz/v1/shows?expand=episodes&id=${result.id_show}`, {
|
const data = await ctx.fetcher<any>(`/v1/shows?expand=episodes&id=${result.id_show}`, {
|
||||||
baseUrl: 'https://lmscript.xyz',
|
baseUrl: 'https://lmscript.xyz',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,15 @@ import { ScrapeContext } from '@/utils/context';
|
||||||
export async function getVideoSources(ctx: ScrapeContext, id: any, media: MovieMedia | ShowMedia): Promise<any> {
|
export async function getVideoSources(ctx: ScrapeContext, id: any, media: MovieMedia | ShowMedia): Promise<any> {
|
||||||
// Fetch video sources
|
// Fetch video sources
|
||||||
|
|
||||||
let url = '';
|
let path = '';
|
||||||
if (media.type === 'show') {
|
if (media.type === 'show') {
|
||||||
url = `https://lmscript.xyz/v1/episodes/view?expand=streams&id=${id}`;
|
path = `/v1/episodes/view?expand=streams&id=${id}`;
|
||||||
} else if (media.type === 'movie') {
|
} else if (media.type === 'movie') {
|
||||||
url = `https://lmscript.xyz/v1/movies/view?expand=streams&id=${id}`;
|
path = `/v1/movies/view?expand=streams&id=${id}`;
|
||||||
}
|
}
|
||||||
const data = await ctx.fetcher<any>(url).then((d) => d);
|
const data = await ctx.fetcher<any>(path, {
|
||||||
|
baseUrl: 'https://lmscript.xyz',
|
||||||
|
});
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue