feat(player): display controller if there is no next video

This commit is contained in:
FineFindus 2024-03-26 20:28:57 +01:00
parent 0bd1e20a0b
commit c0dac7cba0
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B

View File

@ -41,6 +41,7 @@ import com.github.libretube.enums.PlayerEvent
import com.github.libretube.enums.SbSkipOptions
import com.github.libretube.extensions.updateParameters
import com.github.libretube.obj.VideoStats
import com.github.libretube.util.PlayingQueue
import com.github.libretube.util.TextUtils
import java.util.Locale
import java.util.concurrent.Executors
@ -343,6 +344,9 @@ object PlayerHelper {
)
fun shouldPlayNextVideo(isPlaylist: Boolean = false): Boolean {
// if there is no next video, it obviously should not be played
if (PlayingQueue.getNext() == null)
return false
return autoPlayEnabled || (
isPlaylist && PreferenceHelper.getBoolean(
PreferenceKeys.AUTOPLAY_PLAYLISTS,