Skip to content

Integrating Apple TV (tvOS) - #31

Open
foregroundUser wants to merge 11 commits into
masterfrom
integrating-apple-tv
Open

foregroundUser wants to merge 11 commits into
masterfrom
integrating-apple-tv

Conversation

@foregroundUser

Copy link
Copy Markdown
Collaborator

Integrating Apple TV (tvOS)

Brings a native Apple TV app into the repo alongside the existing Android TV app, and lands a round of Android TV improvements.

Apple TV (new)

  • New native SwiftUI app under apple-tv/ (XcodeGen project.yml + SozoTV.xcodeproj, 53 Swift files)
  • Full test suite: Continue Watching, Profiles, Playback Sources, Sidecar Subtitles, Catalog pagination, Release pipeline, content contract
  • PrivacyInfo.xcprivacy for App Store
  • CI workflows: Apple TV CI and Apple TV Release

Android TV (improvements)

  • Profiles via ProfileDatabaseProvider
  • Continue-watching progress (EpisodeProgress)
  • Remote seek steps (RemoteSeekSteps)
  • Search result diffing (SearchResultDiff)
  • torrentserver rebuilt 16 KB page-aligned for Android 15

Next: iterate on improving both Android TV and Apple TV here.

Apple TV: new native SwiftUI app under apple-tv/ (XcodeGen project, 53 Swift files, PrivacyInfo, CI + Release workflows).
Android TV: profiles (ProfileDatabaseProvider), continue-watching (EpisodeProgress), remote seek steps, search result diffing; torrentserver rebuilt 16 KB page-aligned for Android 15.
The new profile_* strings landed in values/ as Uzbek; move them to English in the base and add full uz and ru translations so the required locales pass check_strings.py.
Every server-source episode was asked for "sub", so a dub was never
reachable on TV. Each language an episode lists is now resolved and offered
as its own server (Sub, Dub, a voice name), and the picked one is kept for
the next episode. Movies in more than one language are resolved the same
way. Quality lists that a provider files as languages are left alone.
Moving between shelves focuses the remembered card from code, which does not
scroll: the card could be focused off screen. The Profiles button sits at the
far right with nothing under it, and Up from the first row went past it.
Both failed the UI tests.
The outer reader's scrollTo only moves the vertical scroll view, so a
remembered card off the right edge stayed off screen. Each shelf now scrolls
itself when one of its cards takes focus. The UI tests' focus walker logs
where focus is at each step, so a walk that cannot reach its target says why.
Focus reaches the button from the first row, but nothing reported it as
focused, unlike the header buttons built from SozoActionLabel. The Up
override added earlier had no effect and is gone. The UI tests now dump the
screen when no element reports focus or a focused card is off screen.
The focus walker pressed Down whenever no element reported focus, which is
also the state for a moment after every move while the scroll view follows.
Up from Account reached My library and Down took it straight back, so
Profiles was never reached. It now waits for focus to settle first.

The shelf test checked the focused card against app.frame, which is empty on
tvOS, so it failed with the card on screen. It uses the window now.

The Profiles button goes back to how it was: it was never the cause.
With My library focused, the query over all elements found nothing even
after waiting, and the walker pressed Down, back to Account. It now also asks
the buttons query, and when neither answers it repeats its last move instead
of always pressing Down.
The player holds one 100-episode part of a series. At its last episode it
showed the end card, Next said "this is the last episode", and the episode
list stopped at 100, so One Piece and any long series looked like it ended
there. Past either end of a part the player now loads the next or the
previous part and plays on, the up-next card announces the first episode of
the next part, and history records the part actually playing.
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.

2 participants