mirror of
https://github.com/yattee/yattee.git
synced 2025-10-10 17:38:15 +00:00
Add option "Keep last played video in the queue after restart"
This commit is contained in:
@@ -239,11 +239,11 @@ extension PlayerModel {
|
||||
func restoreQueue() {
|
||||
var restoredQueue = [PlayerQueueItem?]()
|
||||
|
||||
if let lastPlayed = Defaults[.lastPlayed],
|
||||
if let lastPlayed = lastPlayed,
|
||||
!Defaults[.queue].contains(where: { $0.videoID == lastPlayed.videoID })
|
||||
{
|
||||
restoredQueue.append(lastPlayed)
|
||||
Defaults[.lastPlayed] = nil
|
||||
self.lastPlayed = nil
|
||||
}
|
||||
|
||||
restoredQueue.append(contentsOf: Defaults[.queue])
|
||||
|
Reference in New Issue
Block a user