Archived
1

Added preference for the used iTunes Store.

This commit is contained in:
Kim Wittenburg
2015-09-16 19:41:44 +02:00
committed by Kim Wittenburg
parent 548214479a
commit 8d4fba8d8a
6 changed files with 98 additions and 17 deletions

View File

@@ -38,6 +38,8 @@ import Cocoa
static let numberOfSearchResultsKey = "Number of Search Results"
static let iTunesStoreKey = "iTunes Store"
static let removeSavedAlbumsKey = "Remove Saved Albums"
static let useLowResolutionArtworkKey = "Use Low Resolution Artwork"
@@ -79,6 +81,7 @@ import Cocoa
UserDefaultsConstants.overwriteExistingFilesKey: false,
UserDefaultsConstants.keepSearchResultsKey: false,
UserDefaultsConstants.numberOfSearchResultsKey: 10,
UserDefaultsConstants.iTunesStoreKey: NSLocale.currentLocale().objectForKey(NSLocaleCountryCode)!,
UserDefaultsConstants.removeSavedAlbumsKey: false,
UserDefaultsConstants.useLowResolutionArtworkKey: false,
UserDefaultsConstants.useCensoredNamesKey: false,
@@ -150,6 +153,18 @@ import Cocoa
}
}
/// The iTunes Store from which the metadata should be loaded.
///
/// The value of this property must be a valid two-letter ISO country code.
public dynamic var iTunesStore: String {
set {
NSUserDefaults.standardUserDefaults().setObject(newValue, forKey: UserDefaultsConstants.iTunesStoreKey)
}
get {
return NSUserDefaults.standardUserDefaults().stringForKey(UserDefaultsConstants.iTunesStoreKey)!
}
}
/// If `true` the main table view will use 100x100 artworks instead of full
/// sized images. This option does not affect saving.
public dynamic var useLowResolutionArtwork: Bool {