From ebb1ab34672b741880c71f2e5ff595b8b745c932 Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Tue, 13 Oct 2026 08:06:03 +0200 Subject: [PATCH] fix(portals): hide provider placeholder metadata (N/A, -, 0) in details and cards (#1923) * fix(portals): drop provider placeholder metadata at the mapping layer Stalker and Xtream portals send "N/A", "-" or an unrated "0" score for fields they have nothing for, and the detail templates rendered them as data. Normalize them where provider rows are mapped: createStalkerInfo, the shared VOD view-model adapters and the Xtream detail selection. Co-Authored-By: Claude Opus 5.5 * fix(portals): hide placeholder ratings on catalog cards formatGridRating passed a provider "N/A" through as the badge text and rendered an unrated zero as "0.0". Read the value through the shared readProviderRating so both hide the badge and resolveGridRating reaches the generic rating behind a placeholder rating_imdb. Co-Authored-By: Claude Opus 5.5 * fix(xtream): keep placeholder ratings off the sparse VOD fallback page A get_vod_info made only of placeholders is now stripped to sparse and routed to the fallback page, which read the top-level catalog ratings raw: "N/A" survived and a zero became "0.0". Read every candidate through readProviderRating so the next usable rating wins. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- .changes/portals-hide-na-metadata.md | 6 + docs/architecture/embedded-inline-playback.md | 8 ++ docs/architecture/stalker-portal.md | 11 ++ .../xtream-portal-compatibility.md | 6 + .../grid-list/grid-list.component.spec.ts | 18 +++ .../grid-list/grid-list.component.ts | 22 ++-- .../src/lib/stalker-vod.utils.spec.ts | 76 ++++++++++++ .../data-access/src/lib/stalker-vod.utils.ts | 62 ++++++---- .../lib/stores/xtream-detail-metadata.spec.ts | 99 ++++++++++++++++ .../src/lib/stores/xtream-detail-metadata.ts | 98 ++++++++++++++++ .../lib/stores/xtream-vod-selection.spec.ts | 22 ++++ .../src/lib/stores/xtream-vod-selection.ts | 4 + .../src/lib/stores/xtream.store.spec.ts | 33 ++++++ .../src/lib/stores/xtream.store.ts | 4 + .../vod-details-fallback.util.spec.ts | 33 ++++++ .../vod-details/vod-details-fallback.util.ts | 21 ++-- libs/shared/interfaces/src/index.ts | 1 + .../src/lib/provider-metadata.util.spec.ts | 49 ++++++++ .../src/lib/provider-metadata.util.ts | 59 ++++++++++ .../src/lib/vod-details-adapters.spec.ts | 110 ++++++++++++++++++ .../src/lib/vod-details-adapters.ts | 53 +++++---- .../vod-details/vod-details.component.spec.ts | 44 ++++++- 22 files changed, 770 insertions(+), 69 deletions(-) create mode 100644 .changes/portals-hide-na-metadata.md create mode 100644 libs/portal/xtream/data-access/src/lib/stores/xtream-detail-metadata.spec.ts create mode 100644 libs/portal/xtream/data-access/src/lib/stores/xtream-detail-metadata.ts create mode 100644 libs/shared/interfaces/src/lib/provider-metadata.util.spec.ts create mode 100644 libs/shared/interfaces/src/lib/provider-metadata.util.ts diff --git a/.changes/portals-hide-na-metadata.md b/.changes/portals-hide-na-metadata.md new file mode 100644 index 000000000..baace44be --- /dev/null +++ b/.changes/portals-hide-na-metadata.md @@ -0,0 +1,6 @@ +--- +type: fix +area: portals +--- + +Movie and series details and catalog cards from Stalker and Xtream portals no longer show "N/A", "-" or a zero rating in place of missing information. Fields the provider left empty are simply hidden, and TMDB can now fill in the rating and release year for them. diff --git a/docs/architecture/embedded-inline-playback.md b/docs/architecture/embedded-inline-playback.md index 628a4ad89..64cbe46f9 100644 --- a/docs/architecture/embedded-inline-playback.md +++ b/docs/architecture/embedded-inline-playback.md @@ -157,6 +157,14 @@ Contracts: - Hosts provide hero chips/meta/actions as `*appDetailTags` / `*appDetailMeta` / `*appDetailActions` templates; the shell stamps them into the hero and again into the About block. Degradation stays "missing → not rendered". +- Provider stand-ins count as missing: `N/A` (any case), a lone `-`, and a + `0` IMDb/Kinopoisk score are dropped where provider rows are mapped, by + `readProviderText` / `readProviderRating` + (`libs/shared/interfaces/src/lib/provider-metadata.util.ts`) — in + `createStalkerInfo()`, the `vod-details-adapters.ts` normalizers and the + Xtream store's detail selection. Templates keep plain `@if` guards; do not + teach them the placeholder list. Widen the list only with evidence of a + provider sending the new stand-in. - The shell never wraps the `[detail-player]` slot in a conditional; the host's `@if (inlinePlayback())` is the only creator/destroyer of the player subtree, so shell state changes cannot recreate the `