# 030 — P3 Skin section Pro tebe (built 2026-10-09, live in Kodi)

## What exists

- Side menu: **Pro tebe** first (`mil_foryou`, icon `icons/sidemenu/favourites.png`, skin string 31918), group 32000
  in `Home.xml`, a cinematic section (`hero_contract.SECTIONS` / `BASES` 32000, `gen_slots.SECTIONS`), generated by
  `gen_slots.py` + `gen_cinema.py`. Skin setting: Nastavení vzhledu → Milionář → "Pro tebe" (`HomeMenuNoMilForYouButton`)
  + its widget manager; "Obnovit výchozí" turns Pro tebe on and AI doporučení / TMDb / ČSFD off (decision 2).
- Rows `fy_*` (`wcs/foryou/widgets.py`, through `rows.run`): `fy_continue` (films in progress + next episodes,
  latest first), `fy_for_you`, `fy_top10`, `fy_because_1..3`, `fy_tonight`, `fy_new`, `fy_gems`. Cards and clicks are
  the library builders of `wcs/library2/rows.py`; click = detail. A row's header follows the snapshot
  ("Protože jsi viděl Matrix", "Na dnešní večer" / "Na noc"…): the row writes its slot's title string.
- Default slots (6, the platform limit): Pokračovat, Pro tebe, Top 10 v ČR, Protože jsi viděl (1. tip), Na teď,
  Nově s CZ dabingem; the others in the widget manager.
- Hero: kicker `GENRE · year · length · CZ DABING · 4K`, badge `94 % SHODA` (Top 10: `TOP n`) and the reason next
  to it; the TMDb rating is hidden while a badge is shown (gen_cinema).
- Top 10: big rank number on the poster (`milionar.fy.rank`, CARD_POSTER).
- **Zobrazit: Vše / Filmy / Seriály** (2026-10-15, replaced the three chips): one hero button, action `fy_mode` of the
  Pro tebe rows, laid out by the hero button manager like any other (default: after Více informací; it can be moved,
  sent to Další možnosti or hidden) and also an entry of a card's context menu. Its label names the current choice and
  ends with ▼; it opens the context menu used everywhere (Vše / Filmy / Seriály, Další… → Upravit tlačítka hero). A
  choice sets Skin.String(mil.foryou.mode); while the rows reload they fade out and a spinner with "Načítám…" stands in
  the first row's header (Home property milionar.switching.foryou). Code: `wcs/foryou/mode.py`, generator
  `gen_cinema.MODES`; checks `scripts/skin_harness/test_foryou_mode.py`.
- Empty state (no rows): ImageWidget with "Obnovit doporučení" (`action=foryou_build`).
- Series without an episode count (recommendations) have no "0 / 0 ✓" badge (rows.series_item, gen_cinema badge,
  Variables.xml ItemStatusIconVar).

## Service

`wcs/foryou/service.py` thread: first check 45 s after start, then every 5 min; rebuild when the snapshot is missing,
a new day, another time-of-day slot, older than 6 h, or the signals changed (plays, feedback, lists) and the last build
is 20 min old. One build at a time (lock file next to library.db). Rows refresh through the row revisions.

## Release notes

- New defaults for other installs (Pro tebe slots, TMDb / AI off): `python3 scripts/release.py publish
  --snapshot-defaults` on the next deploy.
- Kodi loads addon strings at start: a restart after adding strings.
