Add genre and content rating storage and display on title pages

Store TMDB genres in normalized tables (genres + titleGenres) and content
ratings as a column on titles. Both are fetched during import/refresh using
append_to_response for content ratings (no extra API calls). Displayed in
the title hero between type badge and year. Also fixes pre-existing type
error for profile_path on TmdbSearchResult.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 20:02:42 -05:00
co-authored by Claude Opus 4.6
parent 9e674f44aa
commit be18531ea7
19 changed files with 5355 additions and 114 deletions
+6 -2
View File
@@ -83,11 +83,15 @@ export async function searchTv(query: string, page = 1) {
}
export async function getMovieDetails(tmdbId: number) {
return tmdbFetch<TmdbMovieDetails>(`/movie/${tmdbId}`);
return tmdbFetch<TmdbMovieDetails>(`/movie/${tmdbId}`, {
append_to_response: "release_dates",
});
}
export async function getTvDetails(tmdbId: number) {
return tmdbFetch<TmdbTvDetails>(`/tv/${tmdbId}`);
return tmdbFetch<TmdbTvDetails>(`/tv/${tmdbId}`, {
append_to_response: "content_ratings",
});
}
export async function getTvSeasonDetails(tmdbId: number, seasonNumber: number) {