mirror of
https://github.com/bbara04/Purefin.git
synced 2026-03-31 17:10:08 +02:00
feat: add player screen to TV app via compose navigation
- Add PlayerRoute to the Route sealed interface - Refactor PlayerViewModel to expose loadMedia() for external callers - Add onPlay() to EpisodeScreenViewModel and MovieScreenViewModel - Wire play/resume buttons in TV episode and movie screens - Create TvPlayerScreen with TV-optimized controls: seek bar, playback buttons, track selection panels, queue panel, and state cards - Register PlayerRoute in TvRouteEntryBuilder and TvNavigationModule - Add media3-ui dependency to app-tv module
This commit is contained in:
@@ -124,6 +124,15 @@ class PlayerViewModel @Inject constructor(
|
||||
|
||||
private fun loadInitialMedia() {
|
||||
val id = mediaId ?: return
|
||||
loadMediaById(id)
|
||||
}
|
||||
|
||||
fun loadMedia(id: String) {
|
||||
if (mediaId != null) return // Already loading from SavedStateHandle
|
||||
loadMediaById(id)
|
||||
}
|
||||
|
||||
private fun loadMediaById(id: String) {
|
||||
val uuid = id.toUuidOrNull()
|
||||
if (uuid == null) {
|
||||
dataErrorMessage = "Invalid media id"
|
||||
|
||||
Reference in New Issue
Block a user