mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 18:13:25 +00:00
callback events
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import { UseableFetcher } from '@/fetchers/types';
|
||||
|
||||
export interface ScrapeContext {
|
||||
export type ScrapeContext = {
|
||||
proxiedFetcher: UseableFetcher;
|
||||
fetcher: UseableFetcher;
|
||||
progress(val: number): void;
|
||||
}
|
||||
};
|
||||
|
||||
export type EmbedInput = {
|
||||
url: string;
|
||||
};
|
||||
|
||||
export type EmbedScrapeContext = EmbedInput & ScrapeContext;
|
||||
|
6
src/utils/errors.ts
Normal file
6
src/utils/errors.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class NotFoundError extends Error {
|
||||
constructor(reason?: string) {
|
||||
super(`Couldn't found a stream: ${reason ?? 'not found'}`);
|
||||
this.name = 'NotFoundError';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user