mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-07-26 22:42:17 +00:00
fix: reset episode stream state and hide panels on episode switch
This commit is contained in:
parent
e67bece53c
commit
27b162176a
1 changed files with 13 additions and 3 deletions
|
|
@ -546,6 +546,15 @@ fun PlayerScreen(
|
|||
|
||||
fun switchToEpisodeStream(stream: StreamItem, episode: MetaVideo) {
|
||||
val url = stream.directPlaybackUrl ?: return
|
||||
showNextEpisodeCard = false
|
||||
showSourcesPanel = false
|
||||
showEpisodesPanel = false
|
||||
episodeStreamsPanelState = EpisodeStreamsPanelState()
|
||||
nextEpisodeAutoPlayJob?.cancel()
|
||||
nextEpisodeAutoPlaySearching = false
|
||||
nextEpisodeAutoPlaySourceName = null
|
||||
nextEpisodeAutoPlayCountdown = null
|
||||
PlayerStreamsRepository.clearEpisodeStreams()
|
||||
flushWatchProgress()
|
||||
val epVideoId = episode.id
|
||||
val epResumeVideoId = buildPlaybackVideoId(
|
||||
|
|
@ -587,9 +596,6 @@ fun PlayerScreen(
|
|||
activeVideoId = episode.id
|
||||
activeInitialPositionMs = epResumePositionMs
|
||||
activeInitialProgressFraction = null
|
||||
showEpisodesPanel = false
|
||||
episodeStreamsPanelState = EpisodeStreamsPanelState()
|
||||
PlayerStreamsRepository.clearEpisodeStreams()
|
||||
controlsVisible = true
|
||||
}
|
||||
|
||||
|
|
@ -718,6 +724,10 @@ fun PlayerScreen(
|
|||
previousIsPlaying = false
|
||||
preferredAudioSelectionApplied = false
|
||||
preferredSubtitleSelectionApplied = false
|
||||
showSourcesPanel = false
|
||||
showEpisodesPanel = false
|
||||
episodeStreamsPanelState = EpisodeStreamsPanelState()
|
||||
PlayerStreamsRepository.clearEpisodeStreams()
|
||||
SubtitleRepository.clear()
|
||||
WatchProgressRepository.ensureLoaded()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue