Fix watches

This commit is contained in:
Arkadiusz Fal 2022-11-25 01:54:36 +01:00
parent 0d333b5583
commit 84e50ddd25

View File

@ -74,16 +74,13 @@ extension PlayerModel {
watch = results?.first
}
if self.resetWatchedStatusOnPlaying,
!watch.finished,
let seconds = self.playerItemDuration?.seconds
{
if let seconds = self.playerItemDuration?.seconds {
watch.videoDuration = seconds
}
if finished {
watch.stoppedAt = watch.videoDuration
} else if seconds.isFinite, seconds > 0 {
} else if self.resetWatchedStatusOnPlaying, seconds.isFinite, seconds > 0 {
watch.stoppedAt = seconds
}