mirror of
				https://github.com/yattee/yattee.git
				synced 2025-10-31 04:31:54 +00:00 
			
		
		
		
	only updateWatch status while video is playing
This should circumvent edge cases where videos are marked as watch when they failed to play back. Fixes #660 Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -464,8 +464,6 @@ final class MPVBackend: PlayerBackend { | ||||
|         timeObserverThrottle.execute { | ||||
|             self.model.updateWatch(time: self.currentTime) | ||||
|         } | ||||
|  | ||||
|         self.model.updateTime(self.currentTime!) | ||||
|     } | ||||
|  | ||||
|     private func stopClientUpdates() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Toni Förster
					Toni Förster