From 00717715bbb64b9373aeb928b74a34313bde496e Mon Sep 17 00:00:00 2001 From: Bnyro Date: Tue, 10 Sep 2024 15:43:27 +0200 Subject: [PATCH] fix: autoplay countdown showing even if autoplay disabled this additionaly fixes that the replay button is not shown automatically at the video's end when autoplay is disabled --- .../java/com/github/libretube/ui/fragments/PlayerFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt index ca185ec88..68505caa0 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt @@ -82,6 +82,7 @@ import com.github.libretube.helpers.IntentHelper import com.github.libretube.helpers.NavBarHelper import com.github.libretube.helpers.NavigationHelper import com.github.libretube.helpers.PlayerHelper +import com.github.libretube.helpers.PlayerHelper.autoPlayEnabled import com.github.libretube.helpers.PlayerHelper.checkForSegments import com.github.libretube.helpers.PlayerHelper.getVideoStats import com.github.libretube.helpers.PlayerHelper.isInSegment @@ -302,7 +303,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions { // check if video has ended, next video is available and autoplay is enabled/the video is part of a played playlist. if (playbackState == Player.STATE_ENDED) { - if (!isPlayerTransitioning) { + if (!isPlayerTransitioning && PlayerHelper.isAutoPlayEnabled(playlistId != null)) { isPlayerTransitioning = true if (PlayerHelper.autoPlayCountdown) { showAutoPlayCountdown()