summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-02 10:00:23 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-02 10:00:23 +0200
commit9f6797bfc4d8b55373cc6a957969f03443b5b29d (patch)
tree1e9584d56c362fec78dd45a30195d86a0cd09b52 /docs
parent9e3dfcb8229e0cb3d8e296acd09cf5e2acb9565e (diff)
downloadmeshbay-9f6797bfc4d8b55373cc6a957969f03443b5b29d.tar.gz
fix(hub): a show opens on its first season, not its first thumbnail
Reported live: a show with a dozen seasons opened on season 6. Every season was in the picker and none was missing — the default was wrong. VideoDetailModal took it from `repEntry.season`. `repEntry` is the show's "representative entry", which the poster grid picks as `episodes.find((e) => e.thumb_hash) || episodes[0]`: the first episode that has a thumbnail, so the card has a fallback frame when TMDB has no poster. That is from the original Videos commit; the season tabs came later and read the same entry as "the episode the reader is looking at", which it never was on that path. Episodes are sorted by (season, episode), so a show whose first five seasons had no thumbnail yet — a partial enrichment pass, or ffmpeg failing on those files — hands back a season-6 episode. `defaultSeason(show)` reads the season list and nothing else: the lowest season present, specials only when there is nothing else, and the lowest *number* rather than the first entry so it does not quietly depend on buildSeasons keeping its sort. The effect's dependency on repEntry goes with it — nothing in it reads that any more. test_video_default_season.py runs the function in node. No input it takes can carry a thumbnail, which is the point. docs/mediacenter.md §10.5. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014UtzVrzM7e2tG9fSpkR9ML
Diffstat (limited to 'docs')
-rw-r--r--docs/mediacenter.md25
1 files changed, 23 insertions, 2 deletions
diff --git a/docs/mediacenter.md b/docs/mediacenter.md
index e983ef9..dbdf85c 100644
--- a/docs/mediacenter.md
+++ b/docs/mediacenter.md
@@ -594,8 +594,9 @@ season_meta_resp { tmdb_id, season, confidence, name, overview, air_date,
`video-app.js`'s `VideoDetailModal` shows a season picker
(`Specials` / `Season 1` / `Season 2` / …) whenever a show has more than one
-season, defaulting to whichever season the representative episode belongs
-to. Selecting a season both filters the episode list to it and swaps in that
+season, defaulting to the lowest-numbered season present (`defaultSeason`;
+specials only when there is nothing else). It defaulted to the representative
+episode's season until §10.5, which is not the same thing at all. Selecting a season both filters the episode list to it and swaps in that
season's own `overview`/`air_date` — falling back to the show-level
`overview` when a season's own comes back empty (TMDB has no season-level
text for every show), the same per-field fallback shape §5.4's English
@@ -883,6 +884,26 @@ rectangles, and say so in their own docstrings: `scrollbar-gutter`, because
headless Chrome gives the probe zero-width overlay scrollbars.
`test_tmdb_show_director.py` covers the credit.
+### 10.5 A show that opened on season 6 (2026-09-02)
+
+Every season was in the picker and none was missing; the *default* was wrong.
+`VideoDetailModal` took it from `repEntry.season`, and `repEntry` is the show's
+"representative entry", which the poster grid picks as
+`episodes.find((e) => e.thumb_hash) || episodes[0]` — the first episode that
+has a thumbnail, so the card has a fallback frame when TMDB has no poster.
+That choice is from the original Videos commit; the season tabs came later and
+read the same entry as "the episode the reader is looking at", which it never
+was on that path. Episodes are sorted by (season, episode), so a show whose
+first five seasons had no thumbnail yet — a partial enrichment pass, or ffmpeg
+failing on those particular files — hands back a season-6 episode.
+
+Two meanings of "representative" that were never the same thing, and only one
+of them is about what the reader is looking at. `defaultSeason(show)` now reads
+the season list and nothing else: the lowest-numbered season present, specials
+only when there is nothing else, and the lowest *number* rather than the first
+entry so it does not quietly depend on `buildSeasons` keeping its sort.
+`test_video_default_season.py` — no input it takes can carry a thumbnail.
+
## 11. Acceptance before shipping
1. Re-run the §3 validation (real TMDB calls, same corpus, same script