Merge pull request #2519 from Bnyro/master

Fix that watch positions don't work for the queue
This commit is contained in:
Bnyro 2022-12-27 19:32:25 +01:00 committed by GitHub
commit 7de3642bcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -877,8 +877,10 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
playbackState == Player.STATE_ENDED
)
// save the watch position every time the state changes
saveWatchPosition()
// save the watch position to the database
// only called when the position is unequal to 0, otherwise it would become reset
// before the player can seek to the saved position from videos of the queue
if (exoPlayer.currentPosition != 0L) saveWatchPosition()
// check if video has ended, next video is available and autoplay is enabled.
@Suppress("DEPRECATION")