movie-web/src/backend/helpers/provider.ts

24 lines
493 B
TypeScript
Raw Normal View History

2023-01-11 21:16:48 +01:00
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>;
};