callback events

This commit is contained in:
mrjvs
2023-08-24 21:51:43 +02:00
parent ef766936dd
commit ffe5cf5369
8 changed files with 120 additions and 15 deletions

View File

@@ -1,8 +1,10 @@
import { Fetcher } from '@/fetchers/types';
import { FullScraperEvents } from '@/main/events';
import { Stream } from '@/providers/streams';
export type RunOutput = {
sourceId: string;
fromEmbed: boolean;
embedId?: string;
stream: Stream;
};
@@ -16,3 +18,18 @@ export type EmbedRunOutput = {
embedId: string;
stream?: Stream;
};
export type ProviderRunnerOptions = {
fetcher: Fetcher;
proxiedFetcher: Fetcher;
};
export async function runAllProviders(_ops: ProviderRunnerOptions, _cbs: FullScraperEvents): Promise<RunOutput | null> {
return {
sourceId: '123',
stream: {
type: 'file',
qualities: {},
},
};
}