fix again

This commit is contained in:
Bnyro 2022-08-16 17:30:52 +02:00
parent 751e2fda5f
commit 91b172d661

View File

@ -951,12 +951,14 @@ class PlayerFragment : BaseFragment() {
return
}
// browse the watch positions
var position: Long? = null
Thread {
try {
val position = DatabaseHolder.db.watchPositionDao().findById(videoId!!).position
if (position < streams.duration!! * 0.9) exoPlayer.seekTo(position)
position = DatabaseHolder.db.watchPositionDao().findById(videoId!!).position
if (position!! < streams.duration!! * 0.9) position = null
} catch (e: Exception) {}
}.start()
}.await()
if (position != null) exoPlayer.seekTo(position!!)
}
// used for autoplay and skipping to next video