Merge pull request #745 from stonerl/updateWatch-status

only updateWatch status while video is playing
This commit is contained in:
Arkadiusz Fal 2024-08-24 12:02:42 +02:00 committed by GitHub
commit d501cb938c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -47,7 +47,7 @@ extension PlayerModel {
}
func updateWatch(finished: Bool = false, time: CMTime? = nil) {
guard let currentVideo, saveHistory else { return }
guard let currentVideo, saveHistory, isPlaying else { return }
let id = currentVideo.videoID
let time = time ?? backend.currentTime

View File

@ -464,8 +464,6 @@ final class MPVBackend: PlayerBackend {
timeObserverThrottle.execute {
self.model.updateWatch(time: self.currentTime)
}
self.model.updateTime(self.currentTime!)
}
private func stopClientUpdates() {