mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user