From ba07c410f50a9b7e19bd3ce67e2cbbf50849925b Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 29 Aug 2022 17:58:26 +0200 Subject: [PATCH] Fix respecting restart playing videos setting --- Model/Player/PlayerQueue.swift | 2 +- Model/Player/PlayerQueueItem.swift | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Model/Player/PlayerQueue.swift b/Model/Player/PlayerQueue.swift index 4064e25e..4f064173 100644 --- a/Model/Player/PlayerQueue.swift +++ b/Model/Player/PlayerQueue.swift @@ -227,7 +227,7 @@ extension PlayerModel { let newItem = enqueueVideo(video, atTime: time, prepending: true) - advanceToItem(newItem!) + advanceToItem(newItem!, at: time) } func removeQueueItems() { diff --git a/Model/Player/PlayerQueueItem.swift b/Model/Player/PlayerQueueItem.swift index 097ff5c2..d40a7ad8 100644 --- a/Model/Player/PlayerQueueItem.swift +++ b/Model/Player/PlayerQueueItem.swift @@ -32,6 +32,8 @@ struct PlayerQueueItem: Hashable, Identifiable, Defaults.Serializable { } var shouldRestartPlaying: Bool { + guard Defaults[.watchedVideoPlayNowBehavior] == .continue else { return true } + guard let seconds = playbackTime?.seconds else { return false }