Added option to overwrite existing files when saving artwork
This commit is contained in:
committed by
Kim Wittenburg
parent
4548f43797
commit
e287a935b1
@@ -32,6 +32,8 @@ import Cocoa
|
||||
|
||||
static let artworkTargetKey = "Artwork Target"
|
||||
|
||||
static let overwriteExistingFilesKey = "Overwrite Existing Files"
|
||||
|
||||
static let keepSearchResultsKey = "Keep Search Results"
|
||||
|
||||
static let removeSavedAlbumsKey = "Remove Saved Albums"
|
||||
@@ -72,6 +74,7 @@ import Cocoa
|
||||
public func initializeDefaultValues() {
|
||||
NSUserDefaults.standardUserDefaults().registerDefaults([
|
||||
UserDefaultsConstants.saveArtworkKey: false,
|
||||
UserDefaultsConstants.overwriteExistingFilesKey: false,
|
||||
UserDefaultsConstants.keepSearchResultsKey: false,
|
||||
UserDefaultsConstants.removeSavedAlbumsKey: false,
|
||||
UserDefaultsConstants.useLowResolutionArtworkKey: false,
|
||||
@@ -113,6 +116,16 @@ import Cocoa
|
||||
}
|
||||
}
|
||||
|
||||
/// If `true` any existing files will be overwritten when artworks are saved.
|
||||
public dynamic var overwriteExistingFiles: Bool {
|
||||
set {
|
||||
NSUserDefaults.standardUserDefaults().setBool(newValue, forKey: UserDefaultsConstants.overwriteExistingFilesKey)
|
||||
}
|
||||
get {
|
||||
return NSUserDefaults.standardUserDefaults().boolForKey(UserDefaultsConstants.overwriteExistingFilesKey)
|
||||
}
|
||||
}
|
||||
|
||||
/// If `true` the search results are not removed from the main outline view
|
||||
/// when the user selects a result.
|
||||
public dynamic var keepSearchResults: Bool {
|
||||
|
||||
Reference in New Issue
Block a user