You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.1 KiB
96 lines
2.1 KiB
11 months ago
|
export type MovieData = {
|
||
|
internalId: number;
|
||
11 months ago
|
imdbId: string;
|
||
|
title: string;
|
||
|
localTitle: string;
|
||
|
description: string;
|
||
|
localDescription: string;
|
||
|
posterUrl: string;
|
||
11 months ago
|
type: 'movie' | 'series' | 'episode';
|
||
|
seriesImdbId?: string;
|
||
|
episodeNumber?: number;
|
||
|
seasonNumber?: number;
|
||
11 months ago
|
/**
|
||
|
* A whole number of minutes
|
||
|
*/
|
||
|
duration: number;
|
||
11 months ago
|
totalSeasons?: number;
|
||
11 months ago
|
/**
|
||
|
* Two-letter code
|
||
|
*/
|
||
|
originalLanguage: string;
|
||
|
/**
|
||
|
* Two-letter codes
|
||
|
*/
|
||
|
availableLanguages: string[];
|
||
|
productionYear: number;
|
||
|
releaseDate: string;
|
||
11 months ago
|
dvdReleaseDate?: string;
|
||
11 months ago
|
genres: string[];
|
||
11 months ago
|
directors?: string[];
|
||
11 months ago
|
writers: string[];
|
||
|
actors: string[];
|
||
|
studios: string[];
|
||
11 months ago
|
awards?: string;
|
||
11 months ago
|
productionCountries: string[];
|
||
11 months ago
|
boxOffice?: string;
|
||
|
contentRating?: string;
|
||
|
website?: string;
|
||
11 months ago
|
ratings: {
|
||
|
source: string;
|
||
|
value: string;
|
||
|
}[];
|
||
|
};
|
||
|
|
||
11 months ago
|
export type NormalizedOmdbData = Omit<
|
||
11 months ago
|
MovieData,
|
||
|
| 'availableLanguages'
|
||
11 months ago
|
| 'internalId'
|
||
11 months ago
|
| 'localDescription'
|
||
|
| 'localTitle'
|
||
|
| 'originalLanguage'
|
||
11 months ago
|
| 'studios'
|
||
11 months ago
|
>;
|
||
|
|
||
11 months ago
|
export type NormalizedInternalData = Omit<
|
||
11 months ago
|
MovieData,
|
||
|
| 'actors'
|
||
|
| 'awards'
|
||
|
| 'boxOffice'
|
||
|
| 'contentRating'
|
||
|
| 'description'
|
||
|
| 'directors'
|
||
|
| 'dvdReleaseDate'
|
||
11 months ago
|
| 'episodeNumber'
|
||
11 months ago
|
| 'genres'
|
||
|
| 'posterUrl'
|
||
|
| 'productionCountries'
|
||
|
| 'releaseDate'
|
||
11 months ago
|
| 'seasonNumber'
|
||
|
| 'seriesImdbId'
|
||
11 months ago
|
| 'title'
|
||
|
| 'totalSeasons'
|
||
|
| 'type'
|
||
|
| 'website'
|
||
11 months ago
|
| 'writers'
|
||
11 months ago
|
>;
|
||
11 months ago
|
|
||
|
export type InternalProvider = {
|
||
|
getMetadataByInternalId(
|
||
11 months ago
|
internalId: number,
|
||
11 months ago
|
): Promise<NormalizedInternalData | undefined>;
|
||
|
getMetadataByImdbId(
|
||
11 months ago
|
imdbId: string,
|
||
11 months ago
|
): Promise<NormalizedInternalData | undefined>;
|
||
11 months ago
|
getAllMetadata(): Promise<NormalizedInternalData[]>;
|
||
11 months ago
|
};
|
||
|
|
||
11 months ago
|
export type OmdbProvider = {
|
||
|
getMetadata(imdbId: string): Promise<NormalizedOmdbData | undefined>;
|
||
11 months ago
|
};
|
||
11 months ago
|
|
||
|
export type EnrichedDataService = {
|
||
|
getMetadataByInternalId(internalId: number): MovieData | undefined;
|
||
|
getMetadataByImdbId(imdbId: string): MovieData | undefined;
|
||
|
};
|