# 190 — Cinematic Home sections (Pokračovat, Filmy, Seriály, MyTV)

Requested 2026-10-05 from two reference images: the Filmy section of Home gets a "cinematic" look, the first step of a
theme that leaves Estuary's look behind. Filmy (`mil_mymovies`) first; after the user's OK ("perfektní") Seriály
(`mil_myseries`) the same day from a third reference. The side menu, the other sections and the genre pictures are out
of scope. Pokračovat (`mil_continue`, the first screen) followed after Seriály. **Built 2026-10-05; Filmy and Seriály accepted,
Pokračovat awaiting the user's test.**

## 1. What the user sees

- **Backdrop** over the whole window: a dark base and the selected film's backdrop on the right, dimmed on the left
  (under the text) and faded out at the bottom (under the rows).
- **Hero** of the selected title: spaced kicker (`GENRE · year · 1h 35m`; a series `GENRE · 10 sérií · 1994–2004`,
  a running one `2019–`), title, TMDb rating, plot (four lines, cut with an ellipsis), buttons **Pokračovat / Přehrát**
  and **Více informací**, and for a playback in progress a progress bar with a caption (`23 min zbývá`; an episode
  `S3 · E14 · 12 min zbývá`). An episode card shows its series in the hero.
- **Rows** under the hero: the section's six widget slots, unchanged in content, order and widget manager, drawn as
  rounded cards: wide cards (image, progress, title, and on the right the time left or the episode code), posters
  (a series with its watched / total count), genre tiles. The focused card has a glow
  frame in the accent colour (`button_focus`); a chevron on the right edge shows that a row continues.
- The hero follows the focus: moving along Rozkoukané switches the film in the hero at once.
- The current row always sits right under the hero and the next one shows below it; rows above the current one are
  hidden and come back with Up.

## 2. How it works

| Part | Where |
|------|-------|
| Hero and card texts, ready for Kodi labels (no letter spacing, shrink-to-fit or ellipsis there) | `wcs/skin/hero.py`: `movie` / `series` / `episode` turn a row card into the texts, `apply` writes the item properties `milionar.hero.title / size / kicker / rating / plot / left / note / fanart / play / detail`; called from the three item builders of `wcs/library2/rows.py` |
| Includes: expressions, variables, one backdrop, row styles, per section the hero and the rows | `xml/Includes_MilionarCinema.xml`, generated by `scripts/skin_harness/gen_cinema.py` (`SECTIONS` lists the cinematic sections, `FIELDS` / `STATES` what the hero reads) |
| Textures (shapes and masks only; icons stay Estuary's) | `media/milionar/cinema/*.png`, generated by `scripts/skin_harness/gen_cinema_textures.py` |
| Wiring | `Home.xml`: `MilionarCinemaBackdrop` once at the window root (one image for all sections, so films and series cross-fade), `MilionarCinema_<sec>` in the section's group (29000, 30000; default control = its rows 29001, 30001) |
| Fonts, colours, strings | `Font.xml` `font20`, `font80_title` (Estuary's font files); `colors/defaults.xml` `cinema_*`; skin string 31991, addon strings 32549-32553 (time left, plural forms of "seasons") |

- **Which title the hero shows.** A title row sets `Window(Home).Property(milionar.hero.<sec>)` to its list id on
  focus; the hero reads that list's selected item. Without a chosen row (after a Kodi start) or when that row is empty,
  it reads the first title row that has items. Kodi resolves container ids when the skin loads, so every hero field is a
  variable with one value per slot (`MilCineIs_<sec>_<n>` are mutually exclusive). Genre rows never feed the hero.
- **Buttons.** Ids `<base>901` / `<base>902`, reached with Up from the top row. They run the item's
  `milionar.hero.play` (a film or an episode: `mplay_req … from=resume`; a series: `ctx_next`, its next episode; an
  episode not out yet: the air-date note) and `milionar.hero.detail` (`show_wcs_details`) whatever the row's own click
  option is. The label is Pokračovat for a resumable item, otherwise Přehrát.
- **Rows.** A row is three children of the section's group list (header, panel, "more" arrow; the negative item gap
  is explained in the generator). Every row sets `milionar.row.<sec>` on focus; rows above that one are hidden
  (`MilCineAbove_<sec>_<n>`) but stay focusable (`allowhiddenfocus`). The group list is taller than all rows together,
  so it never scrolls. The lists are panels: only a panel drops the focused layout when it loses focus.
- **Data.** Movie cards carry `backdrop`, `runtime`, `genre`; series cards `backdrop`, `genre`, `seasons`,
  `end_year`, `ended`; `row_cache.VERSION` is 3. The hero backdrop is TMDb
  `original` (`w780` in the low-power profile). No Kodi library data, no network in the widget path.

- **Amended 2026-10-13:** Pokračovat is a section like the others now (plugin rows prepared by the service,
  `docs/plan/skin-optimization/000-index.md` B5); `gen_start.py`, `wcs/skin/startrows.py` and the `STATIC` kind are
  gone. The paragraph below describes what it was.
- **Pokračovat = static items.** The first screen is drawn from skin strings so that it is there in the first frame
  (`gen_start.py`, `wcs/skin/startrows.py`). A static item has no video info, so `gen_cinema.py` has two kinds of
  items, `PLUGIN` and `STATIC`: the same row, card and hero templates, filled with how each kind answers (resumable,
  percent, poster, badge, has items, content). `startrows` stores the hero texts with every item (fields `h*`), drops
  the fields of the old Estuary cards (`RETIRED`) and rebuilds every slot when `FORMAT` changes. `gen_start.py` now
  only generates the items (`StartItem`, `StartContent`); `gen_slots.py` skips the cinematic sections (`CINEMA`).
- **One row property.** The hero reads the current row (`milionar.row.<sec>`); when no title is selected there (genre
  tiles, MyTV channels: items without `milionar.hero.title`) it reads the first row that has one.

## 3. Limits and decisions

- **MyTV** (`mil_mytv`, added last): a channel's hero is its name, `KANÁL · 4 tituly`, the names of its titles, the
  backdrop of the first title cached, Přehrát = the broadcast, Více informací = the channel's dialog
  (`hero.channel`, `widgets._channels`; MyCinema channels get the same texts). A MyTV next episode shows its series
  like any episode (`rows.series_facts` + `hero.episode`); its Přehrát keeps the channel's progress.
  Amended 2026-10-06: a MyTV channel with a program shows what is on now with the lines of any other hero: in the
  place of the rating the badge `PRÁVĚ BĚŽÍ` (addon string 32701) with the series (`milionar.hero.badge` / `.now`,
  `HERO_CHANNEL` in `gen_cinema.py`, static fields `hg` / `hc`), the text box starts with `S1 · E1 · title` and
  continues with the episode's plot, and an episode in progress has the progress bar, the time left and Pokračovat.
  The episode is the first entry of the channel's program queue (`widgets._on_now`), else the next episode of its
  first series. The next-episode row and this hero follow the library's state when the progress is shared
  (`docs/plan/milionar-library/900-decisions.md` 3a).

- Rating is TMDb's (the only one in the cache); the reference showed IMDb / RT / age rating, which the addon does not
  have. No invented values.
- Focus colour is the skin accent, not a fixed blue (the reference was drawn with the blue accent active).
- The side menu keeps Estuary's width (462), so the hero text column is narrower than in the reference.
- A title has three font steps by length (80 / 60 / 45); longer titles are truncated.
- The installed `addons/skin.milionar` may be a copy instead of the dev symlink: `scripts/skin_harness/sync_dev.sh`
  copies the sources there before `kodi_live.py reload`.

## 4. Result (2026-10-05)

- Tests: `scripts/skin_harness/test_cinema.py` (6: generated file current, references resolve, Home wiring),
  `test_rows.py` (15: hero properties of films, series, episodes), plus the touched suites (slots, row cache,
  performance profile, listings, clicks, warm): all green.
- Live Kodi 21.3, 2560x1440, captures in `scripts/dialog_harness/out/live/` (`cinema_filmy_*.png`,
  `cinema_serialy_*.png`): menu focused after a cold start, each row focused, both hero buttons focused, a film with
  and without progress, an episode in progress, a series poster, "Více informací" opens the details dialog in both
  sections and Back returns to the button. `kodi.log` clean after reload and restart.
- Not run: the Pokračovat / Přehrát button was not pressed (it would start playback); its builtin is the same
  `mplay_req` URL the rows already use. The Estuary baseline compare was not run (by the standing agreement).

## 5. Next

Another section is one more entry in `gen_cinema.SECTIONS` plus the same two lines in its `Home.xml` group; its rows
must build items through `hero.apply` (movie, series and episode cards already do).

## 6. Widget click: focus hero

The widget click setting offers `hero` (Focus hero buttons) only in the cinematic Home sections.
`wcs/skin/hero_contract.py` defines these sections for the generator and click catalog. The shared row
template intercepts the click and focuses the section's primary Play/Continue control when the selected
item has a hero play action. It keeps the item selected and does not execute its plugin action.
Folder-only rows keep their existing click behavior; the native detail rows keep their navigation.
Labels are provided in Czech, Slovak and English.

Verified with 20 targeted cinema/detail tests, Python compilation, XML validation and live Kodi:
clicking an episode in the static Continue row focused control 24901, retained the selected title,
kept Home active and left playback stopped. The temporary click setting was restored afterward.
