mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-24 03:36:51 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user