Skip to content

iptv improvements - #636

Merged
ProdigyV21 merged 5 commits into
ProdigyV21:mainfrom
silentbil:iptv_improvements
Sep 4, 2026
Merged

iptv improvements#636
ProdigyV21 merged 5 commits into
ProdigyV21:mainfrom
silentbil:iptv_improvements

Conversation

@silentbil

Copy link
Copy Markdown
Collaborator

Live TV: RTL navigation, Favorite TV on Home, and a channel menu

Fixes

  • RTL D-pad navigation — the IPTV screen inherited the mirrored RTL layout while every
    horizontal key handler stayed hardcoded LTR, so navigation ran opposite to the visuals
    (top nav bar included). Added a shared Key.mirrorHorizontalForRtl() and applied it at
    each key-reading site. Layout itself unchanged.
  • "Favorite TV" row disappearing from Home — a transient empty IPTV cache was read as
    "user has no favourites" and deleted a visible row. A tri-state outcome now separates
    authoritatively empty from cache not ready.
  • Favourites never resolving — they were matched against the ~240-row paged channel
    window instead of the full store; now looked up by id via pagedChannelsByIds.
  • Wrong channel opening from Home — Home passed a raw, unresolved stream URL, and a
    requested channel outside the paged window was discarded in favour of channel Thank you so much for sharing bro. There's some minor issues #1. Home
    now passes only the channel id; out-of-window channels are hydrated and honoured.
  • Back from a Home-launched channel landed in the Live TV guide instead of Home.
  • Hover preview took ~10s to start — a 6s idle gate, now 600ms.
  • Favourite reordering had no visible effect — the order was discarded by an unordered
    Set, both in the SQLite lookup and as a Compose effect key.
  • Long-press on a channel removed the favourite and opened it, and a sustained hold
    then thrashed the menu. A held key turns into a stream of synthetic discrete presses, so
    the OK gesture is now owned in one place and guarded by elapsed time rather than
    repeatCount.

Features

  • Settings → IPTV → "Favorite channels on Home" — pins the Favorite TV row to the top
    of Home (default on).
  • Channel long-press menu in Live TV — Move up / Move down / Remove from favourites
    (Add when not one), plus Quality variants where applicable. Backed by new favourite
    reordering APIs in IptvRepository / TvViewModel.

Verification

Build green, 524 unit tests pass, behaviour verified on an Android TV emulator.

@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Sep 4, 2026
Upstream refactored the same Live TV code, so three IPTV fixes were
re-applied in their new locations:

- LiveTvStartup.chooseStartupChannelId now honours an explicitly
  requested channel that is outside the paged window, instead of
  falling back to the first available channel.
- loadPagedChannelWindow takes the ordered favourites list and sorts by
  it; a Set was discarding the user's favourite ordering.
- Kept upstream's rewritten category-menu key handling, re-applying RTL
  mirroring on the dismiss key.

Also took upstream's retuned guide window constants and category drawer;
dropped EpgGrid's onOpenVariants, since quality variants moved into the
channel long-press menu.
Re-applies the fix to chooseStartupChannelId after upstream moved it
into LiveTvStartup. An explicitly requested channel (Home's Favorite TV
row, launcher deep links) was dropped when it was not in the currently
paged window, falling through to firstAvailableChannelId and tuning an
unrelated channel.
silentbil and others added 2 commits September 4, 2026 13:55
The screen-level OK gesture resolved the focused channel through
visibleEnrichedState.index.byId, which only covers the currently paged
window. Any favourite outside it resolved to null, so holding OK did
nothing on those rows while a mouse long-press still worked — the
pointer path gets the channel object straight from the rendered row.

Record the focused row's channel object as the row reports it and use
that for the gesture, falling back to the index lookup.
@ProdigyV21
ProdigyV21 merged commit 8c16320 into ProdigyV21:main Sep 4, 2026
3 checks passed
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.

2 participants