Kids profiles: one fail-closed policy, enforced at the playback request

Paul, 30 November 2026: unrated films and series blocked unless explicitly approved;
episodes never less restricted than their series; UK U/PG/12/12A/15/18 alongside US film
and TV ratings, anything unrecognised fails closed; the check sits where every stream is
asked for, so resume, autoplay, channel changes and deep links can't get past it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 18:59:36 +00:00
co-authored by Claude Opus 5.5
parent 3cdae246cf
commit 5bebac1299
9 changed files with 199 additions and 75 deletions
+17 -8
View File
@@ -5,14 +5,23 @@ Nothing here moves an existing booking or changes a channel's home, ratings rule
## Kids profiles (release blocker, Paul, 30 November 2026)
- **Kids never see adult-rated programmes, whatever channels they have** (`04515a61`). Kids was protected
by channel only: a Kids profile with Premiere ticked could watch Joker at 06:43. Now a programme rated
R, NC-17, 18 or TV-MA (an episode takes its series' rating, from the box's own catalogue) shows a
"This one's for grown-ups" card instead of playing, and is left out of Catch Up, What's On, the guide
picture and artwork, OrbiFax and the companion's film list. Its guide cell reads "Not for Kids".
- An unrated film is kept from Kids off the kids' own channels; unrated episodes play. Until the ratings
are read after Orbit opens, nothing off the kids' channels plays for Kids.
- Grown-up profiles and every schedule are unchanged. Test: `KidsRatingsTest`.
Kids was protected by channel only: a Kids profile with Premiere ticked could watch Joker at 06:43.
Now one policy decides what a Kids profile may watch (`KidsRatings.kt`), enforced where every stream
is asked for (the playback request itself), so live TV, Catch Up, resume, channel changes, autoplay,
the guide picture and deep links all meet the same check. Grown-up profiles and every schedule are unchanged.
- A programme plays for Kids only when its rating is recognised and suitable: US G, PG, PG-13; TV-Y,
TV-Y7, TV-G, TV-PG, TV-14; UK U, PG, 12, 12A. UK 15, 18, R18 and US R, NC-17, TV-MA never play.
- An episode goes by its series' rating and is never less restricted than its series.
- Anything without a trustworthy rating (none, NR, another country's board, unknown) fails closed
unless explicitly approved for Kids (`KidsApproved.kt`, empty until Paul approves titles). An approval
never overrides a restricted rating.
- Kids sees a "This one's for grown-ups" card instead of the programme, and no picture or artwork of it;
guide cells read "Not for Kids"; Catch Up, What's On, OrbiFax and the companion leave it out.
- Ratings come from the box's own catalogue; until they're read after Orbit opens, nothing plays for Kids.
A `kidsRatings` log line gives counts (no titles) so the effect can be checked after installing.
- Tests: `KidsRatingsTest` (policy, both boards, inheritance, fail-closed, approvals, profile switching,
and the playback request refusing for Kids without asking the server, while grown-ups are unchanged).
## Refresh rounds