From 1e2d92f088c6e33e3c19827a050366a9007531cd Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 29 Sep 2022 19:43:00 +0200 Subject: [PATCH] fix crash --- .../com/github/libretube/ui/views/CustomExoPlayerView.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt b/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt index 2646b240a..a56187838 100644 --- a/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt +++ b/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt @@ -27,6 +27,7 @@ import com.google.android.exoplayer2.ui.AspectRatioFrameLayout import com.google.android.exoplayer2.ui.StyledPlayerView import com.google.android.exoplayer2.util.RepeatModeUtil import com.google.android.material.dialog.MaterialAlertDialogBuilder +import kotlin.math.roundToInt @SuppressLint("ClickableViewAccessibility") internal class CustomExoPlayerView( @@ -61,8 +62,10 @@ internal class CustomExoPlayerView( private val seekIncrement = PreferenceHelper.getString( PreferenceKeys.SEEK_INCREMENT, - "5" - ).toLong() * 1000 + "10.0" + ).toFloat() + .roundToInt() + .toLong() * 1000 private var resizeModePref = PreferenceHelper.getString( PreferenceKeys.PLAYER_RESIZE_MODE,