Skip to content

Compose for TV Phase 7: Real Search converging on same Details as Home - #3190

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

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

Conversation

@sika200581

Copy link
Copy Markdown

Summary

  • Inspects real search APIs (APIRepository.search / quickSearch, SearchViewModel multi-provider amap, SearchResponse apiName+url retention, submit-vs-suggestions debounce) and reuses them — no invented search path
  • Adds TvSearchRepositoryTvSearchMapper → immutable TvSearchResult (+ TvContentRef) → TvSearchViewModel (StateContainer) → TvSearchScreen
  • Search result → Details uses the same TvContentRef + TvDetailsScreen / TvDetailsRepository as Home (no separate search-details path)
  • Explicit submit (Search button / IME Done) — matches SearchFragment.onQueryTextSubmit; cancel superseded searches; no stale overwrite; no Composable→APIRepository calls
  • Empty/Error with Retry/Clear — never silent demo; no SEARCH_HISTORY / DataStore writes
  • Query + selected focus preserved across Details round-trip via ViewModel + hoisted TvSearchFocusState
  • Activates Search destination in TvNavigationShell; Home unchanged; Watchlist/Settings stay placeholders
  • No changes outside app/.../tv/** (+ docs); library / plugins / extractors / players / TV XML untouched

Test plan

  • ./gradlew :app:compileStableDebugKotlin
  • ./gradlew :app:assembleStableDebug
  • Launch TvComposeProbeActivity → Search → submit query → results grid
  • Open a Movie search result → same Details as Home → Watch Now → GeneratorPlayer
  • Open a Series/Anime search result → episodes → Play Episode → GeneratorPlayer
  • Confirm mock never appears / never plays from Search
  • Back from Details restores query + result focus
  • Empty/Error show Retry/Clear (no silent demo)
  • Rapid re-submit cancels prior search (no stale overwrite)

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.
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