From 5534e51c8de9144f7f6be2edeb3d12b67c4d43c1 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sun, 16 Aug 2026 12:37:17 +0200 Subject: [PATCH] refactor(portals): drop the normalized tmdbId that proved nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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 --- libs/shared/interfaces/src/lib/vod-details-adapters.ts | 4 ---- libs/shared/interfaces/src/lib/vod-details-item.interface.ts | 2 -- 2 files changed, 6 deletions(-) diff --git a/libs/shared/interfaces/src/lib/vod-details-adapters.ts b/libs/shared/interfaces/src/lib/vod-details-adapters.ts index bf0788579..55e8db4d7 100644 --- a/libs/shared/interfaces/src/lib/vod-details-adapters.ts +++ b/libs/shared/interfaces/src/lib/vod-details-adapters.ts @@ -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, diff --git a/libs/shared/interfaces/src/lib/vod-details-item.interface.ts b/libs/shared/interfaces/src/lib/vod-details-item.interface.ts index eb7a8f6b0..00f72b07f 100644 --- a/libs/shared/interfaces/src/lib/vod-details-item.interface.ts +++ b/libs/shared/interfaces/src/lib/vod-details-item.interface.ts @@ -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) */