diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index d5cb3b8cb..c1fc1fccf 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -522,9 +522,9 @@ class PlayerFragment : Fragment() { !playWhenReady ) - // check if video has ended, next video is available and autoplay is enabled. - if(playbackState == Player.STATE_ENDED && relatedStreams != null && relatedStreams!!.isNotEmpty() && !transitioning && autoplay) { + if(playbackState == Player.STATE_ENDED && relatedStreams != null && + relatedStreams!!.isNotEmpty() && !transitioning && autoplay) { transitioning = true videoId = relatedStreams!![0].url!!.replace("/watch?v=", "") fetchJsonAndInitPlayer(view)