Fix seek when playlist is not loaded
This commit is contained in:
parent
a320155546
commit
43a112839f
|
@ -358,12 +358,14 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
|
||||||
playbackTicker = null
|
playbackTicker = null
|
||||||
|
|
||||||
val totalDuration = playlist.duration
|
val totalDuration = playlist.duration
|
||||||
val playbackTime = playbackTracker.getPlaybackTime(id)
|
if (totalDuration > 0) {
|
||||||
val remainingTime = totalDuration - playbackTime
|
val playbackTime = playbackTracker.getPlaybackTime(id)
|
||||||
if (remainingTime < 1000) {
|
val remainingTime = totalDuration - playbackTime
|
||||||
playbackTracker.updatePausedAtPlaybackTime(id, 0, 0f)
|
if (remainingTime < 1000) {
|
||||||
} else {
|
playbackTracker.updatePausedAtPlaybackTime(id, 0, 0f)
|
||||||
playbackTracker.pausePlayback(id)
|
} else {
|
||||||
|
playbackTracker.pausePlayback(id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue