webstreamr-github/src/handler/types.ts
2025-06-12 20:56:50 +00:00

22 lines
493 B
TypeScript

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