diff --git a/app/src/main/kotlin/com/muedsa/agetv/ui/features/playback/PlaybackScreen.kt b/app/src/main/kotlin/com/muedsa/agetv/ui/features/playback/PlaybackScreen.kt index 63f5c5d..81c73b6 100644 --- a/app/src/main/kotlin/com/muedsa/agetv/ui/features/playback/PlaybackScreen.kt +++ b/app/src/main/kotlin/com/muedsa/agetv/ui/features/playback/PlaybackScreen.kt @@ -62,6 +62,12 @@ fun PlaybackScreen( LaunchedEffect(key1 = playerEnd) { if (playerEnd) { + if (episodeProgress.aid == aid && exoplayerHolder != null) { + val exoPlayer = exoplayerHolder!! + episodeProgress.duration = exoPlayer.duration + episodeProgress.updateAt = System.currentTimeMillis() + playbackViewModel.saveEpisodeProgress(episodeProgress) + } errorMsgBoxState.error("播放结束,即将返回") delay(3_000) activity?.finish()