mirror of
https://github.com/movie-web/movie-web.git
synced 2025-01-06 04:18:16 +01:00
24 lines
493 B
TypeScript
24 lines
493 B
TypeScript
|
import { MWMediaType } from "../metadata/types";
|
||
|
import { MWEmbed } from "./embed";
|
||
|
import { MWStream } from "./streams";
|
||
|
|
||
|
export type MWProviderScrapeResult = {
|
||
|
stream?: MWStream;
|
||
|
embeds: MWEmbed[];
|
||
|
};
|
||
|
|
||
|
export type MWProviderContext = {
|
||
|
progress(percentage: number): void;
|
||
|
imdbId: string;
|
||
|
tmdbId: string;
|
||
|
};
|
||
|
|
||
|
export type MWProvider = {
|
||
|
id: string;
|
||
|
rank: number;
|
||
|
disabled?: boolean;
|
||
|
type: MWMediaType[];
|
||
|
|
||
|
scrape(ctx: MWProviderContext): Promise<MWProviderScrapeResult>;
|
||
|
};
|