From 7c24a86a6aa4d089c8932cdaf5daf6aaa0b27df2 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 25 May 2023 17:20:33 +0200 Subject: [PATCH] Fix updating watch on AVPlayer --- Model/HistoryModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/HistoryModel.swift b/Model/HistoryModel.swift index 708ef9d2..33e64894 100644 --- a/Model/HistoryModel.swift +++ b/Model/HistoryModel.swift @@ -69,7 +69,7 @@ extension PlayerModel { let watch: Watch! - let duration = self.playerTime.duration.seconds + let duration = activeBackend == .mpv ? self.playerTime.duration.seconds : avPlayerBackend.playerItemDuration?.seconds ?? 0 if results?.isEmpty ?? true { watch = Watch(context: self.backgroundContext)