mirror of
https://github.com/yattee/yattee.git
synced 2025-10-12 18:38:16 +00:00
Fix updating watch history
This commit is contained in:
@@ -48,6 +48,10 @@ extension PlayerModel {
|
||||
let id = currentVideo.videoID
|
||||
let time = backend.currentTime
|
||||
let seconds = time?.seconds ?? 0
|
||||
let duration = playerTime.duration.seconds
|
||||
if seconds < 3 {
|
||||
return
|
||||
}
|
||||
|
||||
let watchFetchRequest = Watch.fetchRequest()
|
||||
watchFetchRequest.predicate = NSPredicate(format: "videoID = %@", id as String)
|
||||
@@ -64,8 +68,6 @@ extension PlayerModel {
|
||||
let duration = self.playerTime.duration.seconds
|
||||
|
||||
if results?.isEmpty ?? true {
|
||||
if seconds < 3, duration > 3 { return }
|
||||
|
||||
watch = Watch(context: self.backgroundContext)
|
||||
watch.videoID = id
|
||||
watch.appName = currentVideo.app.rawValue
|
||||
|
Reference in New Issue
Block a user