improve end of voice broadcast check

This commit is contained in:
Florian Renaud 2022-11-07 16:05:06 +01:00
parent 4e53366727
commit c1dd66003a

View file

@ -402,7 +402,7 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
} }
} }
State.IDLE -> { State.IDLE -> {
if (playbackTime == null || percentage == null || playbackTime == playlist.duration) { if (playbackTime == null || percentage == null || (playlist.duration - playbackTime) < 50) {
playbackTracker.stopPlayback(id) playbackTracker.stopPlayback(id)
} else { } else {
playbackTracker.updatePausedAtPlaybackTime(id, playbackTime, percentage) playbackTracker.updatePausedAtPlaybackTime(id, playbackTime, percentage)