# TiviLux Native v0.4.25 / Build 41 — MultiView + Sports Stability + Complete Movies Patch

This release is based on the supplied **v0.4.23 / Build 39** source baseline and is versioned for release as **v0.4.25 / Build 41** so it installs as a newer build than the v0.4.24 already deployed on TV devices.

## 1. Live TV MultiView

- Adds a native **2 × 2 Live TV MultiView** screen with up to four simultaneous live feeds.
- The selected tile owns audio; all other active tiles remain muted.
- D-pad moves between tiles.
- **OK** opens a remote-friendly Live channel picker for the selected tile.
- **HOLD OK** opens the selected tile in the existing fullscreen Live player.
- **BACK** returns to the guide that launched MultiView (Live Guide or Favorites Guide).
- MultiView is available in two places:
  - Live Groups drawer: **MultiView • 2 × 2**
  - HOLD-OK Guide Settings panel: **MultiView**
- Uses the existing TiviLux Live stream URL/player configuration rather than adding a second playback architecture.
- Respects the provider-reported maximum connection count when it is available.
- Switching household profiles clears MultiView selections.
- Hiding a Live channel removes that channel from any active MultiView tile.
- Leaving the foreground pauses MultiView playback so it cannot continue audio behind Android Home.

## 2. Sports Hub crash/stability overhaul

- Moves expensive Sports EPG scanning, regex/event matching, official-schedule merging, sorting and league-summary construction off the Compose/UI thread onto `Dispatchers.Default`.
- Sports results are now observable cached state and publish only after a complete derived-data build.
- Revision protection prevents an older Sports build from overwriting newer EPG/schedule data.
- Sports rebuild failures fall back safely instead of taking down the whole Sports screen.
- De-duplicates Sports event IDs and provider feed IDs before rendering LazyRows to avoid duplicate-key crashes.
- Limits official scoreboard network work to **4 concurrent requests** rather than opening the full request burst at once.
- Reworks the Game Center featured matchup/broadcast layout so it has bounded height inside the vertical LazyColumn.
- Uses a stacked Game Center layout on narrower TV canvases and the existing two-column layout on wider TVs.
- Keeps the existing provider EPG, NFL / College Football behavior, schedule enrichment, team-channel fallback and provider-stream-only playback model.

## 3. “All Movies” complete-catalog repair

- Treats an empty provider-wide Movie/Series master catalog as suspicious immediately, even before category metadata finishes hydrating.
- Empty cached `All` results are no longer accepted as a completed catalog state.
- Movies and Series now preload into **All** rather than silently selecting the first category.
- Opening **All Movies** immediately starts the existing category-by-category completeness sweep when the global Xtream endpoint is empty or suspiciously small.
- Category responses are merged by provider ID into the master catalog and published progressively, so large 30,000+ libraries can fill in without an artificial cap.
- Delayed startup-cache hydration can no longer replace a newer/larger in-memory Movie or Series catalog with a smaller cached result.
- The empty All screen now shows **“Loading the complete provider Movies library…”** while the full provider catalog is being rebuilt.
- Existing per-category loading, details, playback, search and cache persistence are preserved.

## 4. Regression protection

Preserved and not intentionally changed:

- v0.4.23 Google TV / Google Streamer Live remote mappings.
- Fullscreen Live BACK -> Guide behavior.
- Movie/Series direct-source + MP4/MKV/TS fallback playback.
- Profiles, Favorites Guide, hidden channels/categories and manual Guide ordering.
- HOME/app-switch playback shutdown and background-audio protection.
- Settings -> System -> Clear Cache behavior.
- Existing updater metadata and update-manager implementation.
- Package identity and current UI/branding.

## 5. Files changed

- `app/build.gradle.kts`
- `app/src/main/java/tv/tivilux/nativeplayer/AppViewModel.kt`
- `app/src/main/java/tv/tivilux/nativeplayer/data/SportsScheduleRepository.kt`
- `app/src/main/java/tv/tivilux/nativeplayer/ui/TiviLuxApp.kt`
- `app/src/main/java/tv/tivilux/nativeplayer/ui/screens/LiveScreen.kt`
- `app/src/main/java/tv/tivilux/nativeplayer/ui/screens/MultiViewScreen.kt` **(new)**
- `app/src/main/java/tv/tivilux/nativeplayer/ui/screens/SportsScreen.kt`
- `app/src/main/java/tv/tivilux/nativeplayer/ui/screens/CatalogScreen.kt`

## 6. Validation status

Completed in this environment:

- Source-tree diff review.
- Changed-file delimiter/string/comment balance checks.
- Call-site checks for the updated `LiveScreen` signature.
- `AppScreen.MULTIVIEW` route/reference check.
- Update metadata comparison: `latest.json` unchanged.
- Update manager comparison: `AppUpdateManager.kt` unchanged.
- Version check: `versionCode 41`, `versionName 0.4.25`.

A full Android compile could not be run here because the supplied source package has **no Gradle wrapper** and this runtime has **no Gradle/Android SDK installation**. Final compile plus real-device MultiView decoder/connection testing should run through the existing TiviLux APK builder before bumping the public release.

## Recommended release after builder/device pass

- **Version Name:** `0.4.24`
- **Version Code:** `40`
