More reviewdog satisfaction

This commit is contained in:
Jānis 2022-06-17 14:29:39 +03:00
parent 05959a41d9
commit 2329daef57

View File

@ -522,9 +522,9 @@ class PlayerFragment : Fragment() {
!playWhenReady !playWhenReady
) )
// check if video has ended, next video is available and autoplay is enabled. // 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 transitioning = true
videoId = relatedStreams!![0].url!!.replace("/watch?v=", "") videoId = relatedStreams!![0].url!!.replace("/watch?v=", "")
fetchJsonAndInitPlayer(view) fetchJsonAndInitPlayer(view)