mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 14:50:30 +05:30
don't seek to watch position when end of video
This commit is contained in:
parent
39f683502e
commit
05f0170248
@ -981,7 +981,8 @@ class PlayerFragment : BaseFragment() {
|
|||||||
Thread {
|
Thread {
|
||||||
try {
|
try {
|
||||||
position = DatabaseHolder.db.watchPositionDao().findById(videoId!!).position
|
position = DatabaseHolder.db.watchPositionDao().findById(videoId!!).position
|
||||||
if (position!! < streams.duration!! * 0.9) position = null
|
// position is almost the end of the video => don't seek, start from beginning
|
||||||
|
if (position!! > streams.duration!! * 1000 * 0.9) position = null
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
}
|
}
|
||||||
}.await()
|
}.await()
|
||||||
|
Loading…
Reference in New Issue
Block a user