Skip to content

feat(collections): filter streaming-service pages by genre - #861

Open
silentbil wants to merge 2 commits into
ProdigyV21:mainfrom
silentbil:feature/service-genre-filter
Open

silentbil wants to merge 2 commits into
ProdigyV21:mainfrom
silentbil:feature/service-genre-filter

Conversation

@silentbil

Copy link
Copy Markdown
Collaborator

What

Streaming-service pages (Netflix, HBO Max, Disney+, Apple TV+, …) only had Movies / Series tabs. They now show genre chips under the tabs, so you can narrow a service to e.g. Reality or Crime.

  • Genre lists per tab: Movies use TMDB's movie genres. Series use TMDB's TV genres, which include Reality, Talk, Kids, News and Soap. An "All genres" chip comes first and is selected by default.
  • Independent tabs: each tab keeps its own genre. Picking one reloads only that tab; the other tab keeps what it already loaded.
  • Where it appears: only on pages built purely from TMDB watch-provider sources (the built-in Services collections). Other collections are unchanged.

How

  • ServiceGenreFilter: holds the genre id lists, decides whether a page can be filtered, and sets tmdbGenreId on watch-provider sources.
  • MediaRepository.loadCollectionWatchProviderRefs: passes tmdbGenreId as with_genres with with_watch_providers. The collection refs cache key already includes tmdbGenreId, so filtered pages are cached separately.
  • CollectionDetailsViewModel.selectGenre: restarts the load scope and reloads the changed tab first. The other tab's loaded items are kept, unless that tab was still loading.
  • UI: the chips wrap onto two lines (FlowRow) instead of scrolling. A horizontally scrolling row inside the TV grid was pivot-scrolled past its start in right-to-left layouts, which hid the first chips. Down from a tab goes to the applied genre chip through focusProperties. The chip group doesn't use the focus restorer: it crashed with "Release should only be called once" when focus was sent straight to a chip inside it.
  • Labels: chips reuse the existing movieGenreNameRes / tvGenreNameRes strings. A second commit adds the Hebrew (values-iw) translations for those genre strings, which were missing; this also translates the Home genre tiles.

Testing

  • Unit tests: new ServiceGenreFilterTest (3 tests). CollectionDetailsLoadingTest, CollectionPresentationTest, CollectionTabPagingTest and TmdbCatalogLoadingTest all still pass.
  • Android TV emulator (API 30, Hebrew UI):
    • Netflix → Series → Reality reloads the grid with reality shows.
    • The Movies tab keeps "All genres" and its items.
    • D-pad: Down from the tabs lands on the selected chip, Down moves between the two chip lines, and Up goes back to the tabs. No crashes.
  • Not run: the androidTest device tests.

Service pages (Netflix, HBO Max, Disney+, ...) only offered Movies / Series
tabs. They now show a row of genre chips under the tabs, built from TMDB's
movie and TV genre lists (series get Reality, Talk, Kids, ...), with an
"All genres" chip first.

- Each tab keeps its own genre; picking one reloads only that tab.
- The watch-provider query passes the genre as with_genres. The genre is
  part of the collection cache key, so filtered pages never mix with
  unfiltered ones.
- Chips wrap onto two lines instead of scrolling: a scrolling row inside
  the TV grid was pivot-scrolled past its start in right-to-left layouts.
- Down from a tab lands on the applied genre chip. The chip group has no
  focus restorer, which crashed ("Release should only be called once")
  when focus was sent straight to a chip inside it.
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Nov 2, 2026
@silentbil
silentbil requested a review from ProdigyV21 November 2, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant