mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 16:43:25 +00:00
Fixed syntaxing more
This commit is contained in:
@@ -37,7 +37,7 @@ export async function scrape(ctx: ScrapeContext, media: MovieMedia | ShowMedia,
|
||||
if (media.type === 'movie') {
|
||||
id = result.id_movie;
|
||||
} 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',
|
||||
});
|
||||
|
||||
|
@@ -4,13 +4,15 @@ import { ScrapeContext } from '@/utils/context';
|
||||
export async function getVideoSources(ctx: ScrapeContext, id: any, media: MovieMedia | ShowMedia): Promise<any> {
|
||||
// Fetch video sources
|
||||
|
||||
let url = '';
|
||||
let path = '';
|
||||
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') {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user