Added Option to automatically remove saved items.
This commit is contained in:
committed by
Kim Wittenburg
parent
8d4fba8d8a
commit
e0261f7353
@@ -40,10 +40,12 @@ import Cocoa
|
||||
|
||||
static let iTunesStoreKey = "iTunes Store"
|
||||
|
||||
static let removeSavedAlbumsKey = "Remove Saved Albums"
|
||||
|
||||
static let useLowResolutionArtworkKey = "Use Low Resolution Artwork"
|
||||
|
||||
static let removeSavedItemsKey = "Remove Saved Items"
|
||||
|
||||
static let keepSavedAlbumsKey = "Keep Saved Albums"
|
||||
|
||||
static let useCensoredNamesKey = "Use Censored Names"
|
||||
|
||||
static let caseSensitiveKey = "Case Sensitive"
|
||||
@@ -82,8 +84,9 @@ import Cocoa
|
||||
UserDefaultsConstants.keepSearchResultsKey: false,
|
||||
UserDefaultsConstants.numberOfSearchResultsKey: 10,
|
||||
UserDefaultsConstants.iTunesStoreKey: NSLocale.currentLocale().objectForKey(NSLocaleCountryCode)!,
|
||||
UserDefaultsConstants.removeSavedAlbumsKey: false,
|
||||
UserDefaultsConstants.useLowResolutionArtworkKey: false,
|
||||
UserDefaultsConstants.removeSavedItemsKey: false,
|
||||
UserDefaultsConstants.keepSavedAlbumsKey: false,
|
||||
UserDefaultsConstants.useCensoredNamesKey: false,
|
||||
UserDefaultsConstants.caseSensitiveKey: true,
|
||||
UserDefaultsConstants.clearArtworksKey: false
|
||||
@@ -176,6 +179,27 @@ import Cocoa
|
||||
}
|
||||
}
|
||||
|
||||
/// If `true` all saved items are removed from the list after saving.
|
||||
public dynamic var removeSavedItems: Bool {
|
||||
set {
|
||||
NSUserDefaults.standardUserDefaults().setBool(newValue, forKey: UserDefaultsConstants.removeSavedItemsKey)
|
||||
}
|
||||
get {
|
||||
return NSUserDefaults.standardUserDefaults().boolForKey(UserDefaultsConstants.removeSavedItemsKey)
|
||||
}
|
||||
}
|
||||
|
||||
/// If `true` and `removeSavedItems` is also `true` albums are not removed on
|
||||
/// saving.
|
||||
public dynamic var keepSavedAlbums: Bool {
|
||||
set {
|
||||
NSUserDefaults.standardUserDefaults().setBool(newValue, forKey: UserDefaultsConstants.keepSavedAlbumsKey)
|
||||
}
|
||||
get {
|
||||
return NSUserDefaults.standardUserDefaults().boolForKey(UserDefaultsConstants.keepSavedAlbumsKey)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Tag Preferences
|
||||
|
||||
/// If `true` TagTunes displays and saves censored names instead of the
|
||||
|
||||
Reference in New Issue
Block a user