webstreamr-github/src/source/types.ts
2025-08-04 09:27:25 +00:00

23 lines
491 B
TypeScript

import { ContentType } from 'stremio-addon-sdk';
import { Context, CountryCode } from '../types';
import { Id } from '../utils';
export interface SourceResult {
countryCode: CountryCode;
title?: string;
url: URL;
}
export interface Source {
readonly id: string;
readonly label: string;
readonly contentTypes: ContentType[];
readonly countryCodes: CountryCode[];
readonly baseUrl: string;
handle(ctx: Context, type: ContentType, id: Id): Promise<(SourceResult[])>;
}