feat: surface availability, airing progress and the director in preview

Movies get a theatre/stream/blu-ray icon in the info row, series get the
latest aired episode as S03 E07. Both reveal the relevant dates on hover or
tap through a shared Hint tooltip.

Release dates ride along on the details request via append_to_response and
the series fields are already in the tv payload, so neither indicator costs
an extra call. Theatre state is only claimed while the run can still be
current, otherwise a classic with no digital entry would read as in cinemas.

The credits carousel now opens with the director, read from the crew array
that the credits response already carries. A series has no single director,
so the one behind most episodes stands in.

Drop with_cast from the starring query: TMDB ANDs it with with_people, so
every director link would have resolved to an empty list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
nerandClaude Opus 5 committed 2026-08-04 19:46:51 +03:00
1 parent a25252c66d
commit 6fc41c0901
11 files changed
+310 -10

No files matched your search

Vendored
+55 -2
View File
@@ -18,8 +18,52 @@ interface Details {
imdb_id: string;
runtime: number;
tagline: string;
availability?: Availability;
airing?: Airing;
}
interface TMDBEpisode {
air_date: string | null;
episode_number: number;
season_number: number;
name: string;
}
interface TMDBSeriesDetails {
last_episode_to_air?: TMDBEpisode | null;
next_episode_to_air?: TMDBEpisode | null;
number_of_seasons?: number;
status?: string;
}
/** Where a series currently stands — the latest aired episode plus what follows it */
interface Airing {
season: number;
episode: number;
seasons: number;
ended: boolean;
/** air date of the next episode, ISO string, only when TMDB knows one */
next?: string;
}
interface TMDBReleaseDate {
certification: string;
iso_639_1: string;
note: string;
release_date: string;
type: number;
}
interface TMDBCountryReleaseDates {
iso_3166_1: string;
release_dates: TMDBReleaseDate[];
}
type AvailabilityState = 'theatre' | 'stream' | 'bluray';
/** Earliest worldwide release date per window, ISO strings */
type Availability = Partial<Record<AvailabilityState, string>>;
interface Movie {
adult: boolean;
backdrop_path: string;
@@ -82,9 +126,18 @@ interface Person {
original_name: string;
popularity: number;
profile_path: string;
cast_id: number;
credit_id: string;
order: number;
// crew members carry neither
cast_id?: number;
order?: number;
}
interface Crew extends Person {
department: string;
/** movie credits carry a single job, tv aggregate credits carry one entry per job */
job?: string;
jobs?: Array<{ credit_id: string; job: string; episode_count: number }>;
total_episode_count?: number;
}
interface Actor extends Person {