Compose for TV Phase 8: Read-only Continue Watching + Watchlist/Library - #3191
Open
sika200581 wants to merge 8 commits into
Open
sika200581 wants to merge 8 commits into
sika200581 wants to merge 8 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TvContinueWatchingRepository) usinggetAllResumeStateIds/getLastWatched/ header-cachegetKey/getViewPos— does not callHomeViewModel.getResumeWatching(that path cansetKeyrestore intoDOWNLOAD_HEADER_CACHE).TvWatchlistRepository) from Local list sources (getAllWatchStateIds,getResultWatchState,getBookmarkedData,getAllFavorites) — no SyncRepo/auth UI, no remove/edit, no new persistence.Architectural Q
Yes — both are pure read-only adapters. CW blocked write is
HomeViewModel.getResumeWatching→setKey(DOWNLOAD_HEADER_CACHE, …); solved by a custom read path, not by changing persistence.Test plan
./gradlew :app:compileStableDebugKotlin./gradlew :app:assembleStableDebug