mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Merge pull request #745 from stonerl/updateWatch-status
only updateWatch status while video is playing
This commit is contained in:
commit
d501cb938c
@ -47,7 +47,7 @@ extension PlayerModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updateWatch(finished: Bool = false, time: CMTime? = nil) {
|
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 id = currentVideo.videoID
|
||||||
let time = time ?? backend.currentTime
|
let time = time ?? backend.currentTime
|
||||||
|
@ -464,8 +464,6 @@ final class MPVBackend: PlayerBackend {
|
|||||||
timeObserverThrottle.execute {
|
timeObserverThrottle.execute {
|
||||||
self.model.updateWatch(time: self.currentTime)
|
self.model.updateWatch(time: self.currentTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.model.updateTime(self.currentTime!)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func stopClientUpdates() {
|
private func stopClientUpdates() {
|
||||||
|
Loading…
Reference in New Issue
Block a user