mirror of
https://github.com/p-stream/providers.git
synced 2026-01-11 20:10:33 +00:00
40 lines
825 B
TypeScript
40 lines
825 B
TypeScript
import { Fetcher } from '@/fetchers/types';
|
|
import { FullScraperEvents } from '@/main/events';
|
|
import { ScrapeMedia } from '@/main/media';
|
|
import { Stream } from '@/providers/streams';
|
|
|
|
export type RunOutput = {
|
|
sourceId: string;
|
|
embedId?: string;
|
|
stream: Stream;
|
|
};
|
|
|
|
export type SourceRunOutput = {
|
|
sourceId: string;
|
|
stream?: Stream;
|
|
embeds: [];
|
|
};
|
|
|
|
export type EmbedRunOutput = {
|
|
embedId: string;
|
|
stream?: Stream;
|
|
};
|
|
|
|
export type ProviderRunnerOptions = {
|
|
fetcher: Fetcher;
|
|
proxiedFetcher: Fetcher;
|
|
sourceOrder?: string[];
|
|
embedOrder?: string[];
|
|
events?: FullScraperEvents;
|
|
media: ScrapeMedia;
|
|
};
|
|
|
|
export async function runAllProviders(_ops: ProviderRunnerOptions): Promise<RunOutput | null> {
|
|
return {
|
|
sourceId: '123',
|
|
stream: {
|
|
type: 'file',
|
|
qualities: {},
|
|
},
|
|
};
|
|
}
|