Merge pull request #6783 from Bnyro/master

fix: starting video from queue when autoplay countdown enabled
This commit is contained in:
Bnyro 2024-11-19 10:05:43 +01:00 committed by GitHub
commit 9286bbe059
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -182,15 +182,17 @@ open class OnlinePlayerService : AbstractPlayerService() {
* Plays the next video from the queue * Plays the next video from the queue
*/ */
private fun playNextVideo(nextId: String? = null) { private fun playNextVideo(nextId: String? = null) {
if (nextId == null && PlayingQueue.repeatMode == Player.REPEAT_MODE_ONE) {
exoPlayer?.seekTo(0)
return
}
saveWatchPosition() saveWatchPosition()
if (!PlayerHelper.isAutoPlayEnabled(playlistId != null) && nextId == null) return if (nextId == null) {
if (!isAudioOnlyPlayer && PlayerHelper.autoPlayCountdown) return if (PlayingQueue.repeatMode == Player.REPEAT_MODE_ONE) {
exoPlayer?.seekTo(0)
return
}
if (!PlayerHelper.isAutoPlayEnabled(playlistId != null)) return
if (!isAudioOnlyPlayer && PlayerHelper.autoPlayCountdown) return
}
val nextVideo = nextId ?: PlayingQueue.getNext() ?: return val nextVideo = nextId ?: PlayingQueue.getNext() ?: return