Add watch trailer button with cinematic YouTube player dialog

Fetch trailer video keys from TMDB videos API during title import/refresh,
store in DB, and display a "Trailer" button on title pages that opens a
media-chrome Sutro-themed YouTube player in a fullwidth dialog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 13:36:38 -05:00
co-authored by Claude Opus 4.6
parent f3a425a5a9
commit 9ecf7bbe3c
12 changed files with 2237 additions and 1 deletions
+5
View File
@@ -7,6 +7,7 @@ import type {
TmdbSearchResponse,
TmdbSeasonDetails,
TmdbTvDetails,
TmdbVideosResponse,
TmdbWatchProviderResponse,
} from "./types";
@@ -141,6 +142,10 @@ export async function discover(
);
}
export async function getVideos(tmdbId: number, type: "movie" | "tv") {
return tmdbFetch<TmdbVideosResponse>(`/${type}/${tmdbId}/videos`);
}
export async function findByExternalId(
externalId: string,
source: "imdb_id" | "tvdb_id",