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:
TheCatLady
2021-09-19 05:11:46 -04:00
committed by GitHub
parent db42c46781
commit 98ece67655
10 changed files with 174 additions and 28 deletions

View File

@@ -3,18 +3,20 @@ import type {
TmdbMovieReleaseResult,
TmdbProductionCompany,
} from '../api/themoviedb/interfaces';
import Media from '../entity/Media';
import {
ProductionCompany,
Genre,
Cast,
Crew,
ExternalIds,
Genre,
mapCast,
mapCrew,
ExternalIds,
mapExternalIds,
mapVideos,
mapWatchProviders,
ProductionCompany,
WatchProviders,
} from './common';
import Media from '../entity/Media';
export interface Video {
url?: string;
@@ -78,6 +80,7 @@ export interface MovieDetails {
mediaInfo?: Media;
externalIds: ExternalIds;
plexUrl?: string;
watchProviders?: WatchProviders[];
}
export const mapProductionCompany = (
@@ -136,4 +139,5 @@ export const mapMovieDetails = (
: undefined,
externalIds: mapExternalIds(movie.external_ids),
mediaInfo: media,
watchProviders: mapWatchProviders(movie['watch/providers']?.results ?? {}),
});