mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Add option "Keep last played video in the queue after restart"
This commit is contained in:
@@ -154,6 +154,7 @@ extension Defaults.Keys {
|
||||
static let recentlyOpened = Key<[RecentItem]>("recentlyOpened", default: [])
|
||||
|
||||
static let queue = Key<[PlayerQueueItem]>("queue", default: [])
|
||||
static let saveLastPlayed = Key<Bool>("saveLastPlayed", default: false)
|
||||
static let lastPlayed = Key<PlayerQueueItem?>("lastPlayed")
|
||||
static let playbackMode = Key<PlayerModel.PlaybackMode>("playbackMode", default: .queue)
|
||||
|
||||
|
@@ -9,6 +9,7 @@ struct HistorySettings: View {
|
||||
@EnvironmentObject<PlayerModel> private var player
|
||||
|
||||
@Default(.saveRecents) private var saveRecents
|
||||
@Default(.saveLastPlayed) private var saveLastPlayed
|
||||
@Default(.saveHistory) private var saveHistory
|
||||
@Default(.showWatchingProgress) private var showWatchingProgress
|
||||
@Default(.watchedThreshold) private var watchedThreshold
|
||||
@@ -57,6 +58,7 @@ struct HistorySettings: View {
|
||||
Toggle("Save history of played videos", isOn: $saveHistory)
|
||||
Toggle("Show progress of watching on thumbnails", isOn: $showWatchingProgress)
|
||||
.disabled(!saveHistory)
|
||||
Toggle("Keep last played video in the queue after restart", isOn: $saveLastPlayed)
|
||||
}
|
||||
|
||||
Section(header: SettingsHeader(text: "Watched")) {
|
||||
|
Reference in New Issue
Block a user