mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Merge pull request #1175 from Bnyro/master
don't seek to watch position when end of video
This commit is contained in:
commit
5e01f2c9c1
@ -981,7 +981,8 @@ class PlayerFragment : BaseFragment() {
|
||||
Thread {
|
||||
try {
|
||||
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) {
|
||||
}
|
||||
}.await()
|
||||
|
Loading…
x
Reference in New Issue
Block a user