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