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
@@ -4,7 +4,7 @@ import { WheelGesturesPlugin } from "embla-carousel-wheel-gestures";
import { createStore, Provider, useAtom, useAtomValue } from "jotai";
import { useState } from "react";
import { TitleCardSkeleton } from "@/components/skeletons";
import { ExploreTitleCard } from "@/components/title-card";
import { TitleCard } from "@/components/title-card";
import { Button } from "@/components/ui/button";
import {
Carousel,
@@ -175,14 +175,13 @@ function FilterableTitleRowInner({
className="animate-stagger-item"
style={{ "--stagger-index": i } as React.CSSProperties}
>
<ExploreTitleCard
<TitleCard
tmdbId={item.tmdbId}
type={item.type}
title={item.title}
posterPath={item.posterPath}
releaseDate={item.releaseDate}
voteAverage={item.voteAverage}
href={`/titles/tmdb-${item.tmdbId}-${item.type}`}
userStatus={userStatuses[`${item.tmdbId}-${item.type}`]}
episodeProgress={
episodeProgress[`${item.tmdbId}-${item.type}`]
@@ -1,7 +1,7 @@
"use client";
import { WheelGesturesPlugin } from "embla-carousel-wheel-gestures";
import { ExploreTitleCard } from "@/components/title-card";
import { TitleCard } from "@/components/title-card";
import {
Carousel,
CarouselContent,
@@ -57,14 +57,13 @@ export function TitleRow({
className="animate-stagger-item"
style={{ "--stagger-index": i } as React.CSSProperties}
>
<ExploreTitleCard
<TitleCard
tmdbId={item.tmdbId}
type={item.type}
title={item.title}
posterPath={item.posterPath}
releaseDate={item.releaseDate}
voteAverage={item.voteAverage}
href={`/titles/tmdb-${item.tmdbId}-${item.type}`}
userStatus={userStatuses?.[`${item.tmdbId}-${item.type}`]}
episodeProgress={
episodeProgress?.[`${item.tmdbId}-${item.type}`]