identify-media
Version:
Analyse file path and content to make search criteria for media APIs
36 lines • 974 B
TypeScript
export * from "./omdb";
export * from "./opensubtitles";
export * from "./tmdb";
export interface MediaInfo {
plot?: string;
images: Record<string, string>;
}
export interface Movie {
type: 'movie';
imdbId?: string;
tmdbId?: number;
title: string;
release?: string;
mediaInfo: MediaInfo;
}
export declare const isMovie: (possible: unknown) => possible is Movie;
export interface TVShow {
type: 'tv';
imdbId?: string;
tmdbId?: number;
name: string;
firstAirDate?: string;
mediaInfo: MediaInfo;
}
export declare const isTVShow: (possible: unknown) => possible is TVShow;
export declare type Media = Movie | TVShow;
export declare const mergeMedia: (a: Media, b: Media) => Media;
export interface RequestConfig {
baseURL: string;
url: string;
method: 'GET';
params?: Record<string, unknown>;
headers?: Record<string, string>;
responseType?: 'json' | 'stream';
}
//# sourceMappingURL=index.d.ts.map