refactor: refine TV detail cast rows and player queue behavior

Temporarily hide cast rows on TV movie, episode, and series detail surfaces while preserving the surrounding section layout.

Simplify TV player queue rows by removing the secondary subtitle line so queued items scan more cleanly.

Increase the next-up queue fetch from 5 to 10 items and skip missing playlist episodes with an error log instead of throwing during queue mapping.
This commit is contained in:
2026-04-25 18:40:46 +02:00
parent f7f9fc1058
commit 78a5f716c0
7 changed files with 43 additions and 51 deletions

View File

@@ -157,7 +157,7 @@ class PlayerManager @Inject constructor(
val nextUpPlayableMedias = playableMediaRepository.getNextUpPlayableMedias(
episodeId = _currentMediaId.value ?: return,
existingIds = _playlist.value.map { it.id }.toSet(),
count = 5
count = 10
)
addToQueue(nextUpPlayableMedias)
}

View File

@@ -1,5 +1,6 @@
package hu.bbara.purefin.player.viewmodel
import android.util.Log
import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
@@ -126,7 +127,8 @@ class PlayerViewModel @Inject constructor(
queue = episodes.mapNotNull { episode ->
val episodeValue = episode.first()
if (episodeValue == null) {
throw IllegalStateException("Episode not found for media id: $episodeValue")
Log.e("PlayerViewModel", "Episode not found for playlist: $playlist")
return@mapNotNull null
}
PlaylistElementUiModel(
id = episodeValue.id.toString(),