Skip to content

feat(live-tv): browse channel guide and play catch-up from the player - #88

Merged
bilipp merged 1 commit into
mainfrom
feat/catchup
Jun 23, 2026
Merged

feat(live-tv): browse channel guide and play catch-up from the player#88
bilipp merged 1 commit into
mainfrom
feat/catchup

Conversation

@bilipp

@bilipp bilipp commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Adds catch-up support to the in-player live-TV experience. The channel switcher (left press on the Siri remote during playback) now has a third Liquid Glass column — the Guide of the focused channel. Channels that advertise an archive are flagged, and from their guide the viewer can pick an already-aired programme to replay via catch-up, addressing the issue's ask to "go back and watch programs that already aired."

Implementation

  • Third "Guide" column in TVChannelBrowserOverlay: it follows channel focus (debounced like the category/channel columns), shows the channel's programmes oldest-first, marks the live programme, and renders a catch-up affordance on past entries. Categories / Channels / Guide are each their own focusSection, so the remote hops between them.
  • Catch-up highlighting: channel rows that report tvArchive > 0 get a clock.arrow.circlepath badge so the viewer knows a replay archive is available before stepping into the guide.
  • Playback: selecting the live programme plays the channel live; a past programme starts catch-up; an upcoming one is a no-op. Catch-up is modelled as a new PlayableMedia.catchup(...)kind: .vod (seekable archive, no live banner, channel surfing disabled) with the channel's .live content ref (so no watch-progress is written, matching existing live behaviour).
  • EPG fetching rework: the local store already retains past programmes (XMLTV sync is wipe-and-replace with no time filtering), so no sync change was needed. Added TVPlayerContent.guideListings(channelId:archiveDays:), which reaches back over the archive window for catch-up channels (the existing epgListings only returned end > now). The index-served channelId + end query keeps it to a small slice of the guide.
  • Catch-up URL fix: XtreamClient.buildCatchupURL was previously unused and built a non-standard path (unix timestamp + seconds). Rewrote it to the standard Xtream timeshift format …/timeshift/user/pass/{durationMinutes}/{Y-m-d:H-i}/{streamId}.{ext}.

Testing

  • Acceptance criteria met
  • Tests pass (PlayableMediaTests, XtreamClientURLTests — iOS 17 Pro sim, TEST SUCCEEDED)
  • tvOS build compiles (Apple TV 4K, tvOS 26.5BUILD SUCCEEDED)
  • SwiftLint / SwiftFormat clean (pre-commit hooks passed)
  • Tests added — catch-up URL format + PlayableMedia.catchup (archive / non-archive / m3u cases). The guide column and focus flow are tvOS-only UI (tests run on iOS sim), so they were verified by build only.

Platforms

  • tvOS

Related

Closes #25

@bilipp
bilipp merged commit 7613474 into main Jun 23, 2026
@bilipp
bilipp deleted the feat/catchup branch June 23, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: catchup support

1 participant