Add actor/cast information with person pages and search support

Integrate TMDB credits data into the app: cast carousels on title detail
pages, person detail pages with biography and filmography, and person
search results in the command palette. Includes new persons/titleCast
DB tables, profile image caching, and a nightly credits refresh cron job.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 14:36:39 -05:00
co-authored by Claude Opus 4.6
parent 9ecf7bbe3c
commit cd5d773e98
27 changed files with 3957 additions and 44 deletions
@@ -0,0 +1,34 @@
CREATE TABLE `persons` (
`id` text PRIMARY KEY,
`tmdbId` integer NOT NULL,
`name` text NOT NULL,
`biography` text,
`birthday` text,
`deathday` text,
`placeOfBirth` text,
`profilePath` text,
`knownForDepartment` text,
`popularity` real,
`imdbId` text,
`lastFetchedAt` integer
);
--> statement-breakpoint
CREATE TABLE `titleCast` (
`id` text PRIMARY KEY,
`titleId` text NOT NULL,
`personId` text NOT NULL,
`character` text,
`department` text DEFAULT 'Acting' NOT NULL,
`job` text,
`displayOrder` integer DEFAULT 0 NOT NULL,
`episodeCount` integer,
`lastFetchedAt` integer,
CONSTRAINT `fk_titleCast_titleId_titles_id_fk` FOREIGN KEY (`titleId`) REFERENCES `titles`(`id`) ON DELETE CASCADE,
CONSTRAINT `fk_titleCast_personId_persons_id_fk` FOREIGN KEY (`personId`) REFERENCES `persons`(`id`) ON DELETE CASCADE
);
--> statement-breakpoint
CREATE UNIQUE INDEX `persons_tmdbId_unique` ON `persons` (`tmdbId`);--> statement-breakpoint
CREATE INDEX `persons_name` ON `persons` (`name`);--> statement-breakpoint
CREATE UNIQUE INDEX `titleCast_unique` ON `titleCast` (`titleId`,`personId`,`department`,`character`);--> statement-breakpoint
CREATE INDEX `titleCast_titleId_displayOrder` ON `titleCast` (`titleId`,`displayOrder`);--> statement-breakpoint
CREATE INDEX `titleCast_personId` ON `titleCast` (`personId`);
File diff suppressed because it is too large Load Diff