refactor(portals): drop the normalized tmdbId that proved nothing

`NormalizedVodMeta.tmdbId` existed only to gate the year chip, and its
comment claimed a numeric `tmdb_id` proved enrichment had run. That test
was wrong — the provider field is `number | string` — so the gate moved
to the navigation target and the field lost its last consumer. Removing
it beats re-documenting it: a field that survives with a false guarantee
in its doc comment is how the rejected gate gets reintroduced.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-08-16 12:37:17 +02:00
1 parent 9b8174f761
commit 5534e51c8d
2 files changed
-6

No files matched your search

@@ -32,9 +32,6 @@ export function normalizeXtreamVod(item: XtreamVodDetails): NormalizedVodMeta {
tmdbCast: info?.tmdb_cast,
tmdbDirectors: info?.tmdb_directors,
tmdbRecommendations: info?.tmdb_recommendations,
// Provider payloads carry tmdb_id as an untrusted string too; only
// a merge-written number proves an enrichment match
tmdbId: typeof info?.tmdb_id === 'number' ? info.tmdb_id : undefined,
tmdbGenres: info?.tmdb_genres,
tmdbCountries: info?.tmdb_countries,
};
@@ -67,7 +64,6 @@ export function normalizeStalkerVod(item: StalkerVodDetails): NormalizedVodMeta
tmdbCast: info?.tmdb_cast,
tmdbDirectors: info?.tmdb_directors,
tmdbRecommendations: info?.tmdb_recommendations,
tmdbId: info?.tmdb_id,
tmdbMediaType: info?.tmdb_media_type,
tmdbGenres: info?.tmdb_genres,
tmdbCountries: info?.tmdb_countries,
@@ -92,8 +92,6 @@ export interface NormalizedVodMeta {
tmdbDirectors?: TmdbEnrichedCastMember[];
/** TMDB recommendations (drives the cross-portal "Similar" rail) */
tmdbRecommendations?: TmdbRecommendation[];
/** Matched TMDB id — gates the clickable year chip (Discover page) */
tmdbId?: number;
/** Media type the enrichment matched as; Discover click routing */
tmdbMediaType?: TmdbMediaType;
/** Per-entry clickable genre chips (Discover page) */