Skip to content

Compose for TV Phase 8: Read-only Continue Watching + Watchlist/Library - #3191

Open
sika200581 wants to merge 8 commits into
recloudstream:masterfrom
sika200581:compose-tv-phase-8
Open

sika200581 wants to merge 8 commits into
recloudstream:masterfrom
sika200581:compose-tv-phase-8

Conversation

@sika200581

Copy link
Copy Markdown

Summary

  • Pure read-only Continue Watching adapter (TvContinueWatchingRepository) using getAllResumeStateIds / getLastWatched / header-cache getKey / getViewPosdoes not call HomeViewModel.getResumeWatching (that path can setKey restore into DOWNLOAD_HEADER_CACHE).
  • Pure read-only Watchlist/Library adapter (TvWatchlistRepository) from Local list sources (getAllWatchStateIds, getResultWatchState, getBookmarkedData, getAllFavorites) — no SyncRepo/auth UI, no remove/edit, no new persistence.
  • Home CW uses real rail when present; empty CW omitted (never mixes demo CW into live catalog). Watchlist destination activated with Loading/Empty/Error/Content, D-pad, shared Details.

Architectural Q

Yes — both are pure read-only adapters. CW blocked write is HomeViewModel.getResumeWatchingsetKey(DOWNLOAD_HEADER_CACHE, …); solved by a custom read path, not by changing persistence.

Test plan

  • ./gradlew :app:compileStableDebugKotlin
  • ./gradlew :app:assembleStableDebug
  • On device: Home CW opens Details (not direct play); Watchlist sections match Local Library labels; stale items → Details error

Introduce an isolated TvComposeProbeActivity with TvTheme and a small
focusable card/button screen using androidx.tv:tv-material:1.1.0 only.
Register the activity without launcher filters so phone and legacy TV
startup stay unchanged; document adb launch for debug builds.
Build a structural TV navigation shell with mock Home (hero + rails),
reusable focus scale/glow cards, and DEBUG-only settings entry — still
isolated from APIRepository, player, and legacy TV XML.
Wire APIRepository.getMainPage through TvHomeRepository into immutable
TV models and MVI StateContainer UI states, with explicit mock fallback
and Continue Watching kept demo-only (no history/DataStore writes).
Wire Home cards/hero Details through compact TvContentRef into
TvDetailsRepository (real load flow) and immutable Details UI; Watch Now
remains a stub with no player, and mock items never invent load IDs.
Wire Details Watch Now through an immutable TvPlaybackRequest and
TvPlaybackBridge into RepoLinkGenerator + GeneratorPlayer without
changing CS3IPlayer, extractors, or custom player UI. Movies only;
series/anime/live/torrent stay disabled for Phase 6.
Map real LoadResponse Episode/SeasonData into immutable TvSeason/TvEpisode,
add D-pad season+episode selector, and play via existing GeneratorPlayer path.
Wire TvSearchScreen through APIRepository.search into immutable
TvSearchResult/TvContentRef so Search opens the same Details and
playback path as Home. Explicit submit, cancel-safe loads, no history writes.
Bridge Local resume/bookmark/favorites DataStore reads into immutable TV
models without calling HomeViewModel.getResumeWatching (cache restore write)
or SyncRepo auth libraries; Watchlist opens shared Details for viewing only.
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.

1 participant