feat: list streaming providers on movie/TV detail pages (#1778)
* feat: list streaming providers on movie/TV detail pages * fix(ui): add margin to media fact value
This commit is contained in:
@@ -170,7 +170,8 @@ class TheMovieDb extends ExternalAPI {
|
||||
{
|
||||
params: {
|
||||
language,
|
||||
append_to_response: 'credits,external_ids,videos,release_dates',
|
||||
append_to_response:
|
||||
'credits,external_ids,videos,release_dates,watch/providers',
|
||||
},
|
||||
},
|
||||
43200
|
||||
@@ -196,7 +197,7 @@ class TheMovieDb extends ExternalAPI {
|
||||
params: {
|
||||
language,
|
||||
append_to_response:
|
||||
'aggregate_credits,credits,external_ids,keywords,videos,content_ratings',
|
||||
'aggregate_credits,credits,external_ids,keywords,videos,content_ratings,watch/providers',
|
||||
},
|
||||
},
|
||||
43200
|
||||
|
||||
@@ -166,6 +166,10 @@ export interface TmdbMovieDetails {
|
||||
};
|
||||
external_ids: TmdbExternalIds;
|
||||
videos: TmdbVideoResult;
|
||||
'watch/providers'?: {
|
||||
id: number;
|
||||
results?: { [iso_3166_1: string]: TmdbWatchProviders };
|
||||
};
|
||||
}
|
||||
|
||||
export interface TmdbVideo {
|
||||
@@ -269,6 +273,10 @@ export interface TmdbTvDetails {
|
||||
results: TmdbKeyword[];
|
||||
};
|
||||
videos: TmdbVideoResult;
|
||||
'watch/providers'?: {
|
||||
id: number;
|
||||
results?: { [iso_3166_1: string]: TmdbWatchProviders };
|
||||
};
|
||||
}
|
||||
|
||||
export interface TmdbVideoResult {
|
||||
@@ -401,3 +409,16 @@ export interface TmdbNetwork {
|
||||
logo_path?: string;
|
||||
origin_country?: string;
|
||||
}
|
||||
|
||||
export interface TmdbWatchProviders {
|
||||
link?: string;
|
||||
buy?: TmdbWatchProviderDetails[];
|
||||
flatrate?: TmdbWatchProviderDetails[];
|
||||
}
|
||||
|
||||
export interface TmdbWatchProviderDetails {
|
||||
display_priority?: number;
|
||||
logo_path?: string;
|
||||
provider_id: number;
|
||||
provider_name: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user