Archived
1

Added "Use English Tags" Preference

This commit is contained in:
Kim Wittenburg
2015-10-21 10:27:58 +02:00
committed by Kim Wittenburg
parent 98d6d492d0
commit f75c16cb27
4 changed files with 60 additions and 18 deletions

View File

@@ -40,6 +40,8 @@ import Cocoa
static let iTunesStoreKey = "iTunes Store"
static let useEnglishTagsKey = "Use English Tags"
static let useLowResolutionArtworkKey = "Use Low Resolution Artwork"
static let removeSavedItemsKey = "Remove Saved Items"
@@ -84,6 +86,7 @@ import Cocoa
UserDefaultsConstants.keepSearchResultsKey: false,
UserDefaultsConstants.numberOfSearchResultsKey: 10,
UserDefaultsConstants.iTunesStoreKey: NSLocale.currentLocale().objectForKey(NSLocaleCountryCode)!,
UserDefaultsConstants.useEnglishTagsKey: false,
UserDefaultsConstants.useLowResolutionArtworkKey: false,
UserDefaultsConstants.removeSavedItemsKey: false,
UserDefaultsConstants.keepSavedAlbumsKey: false,
@@ -167,6 +170,16 @@ import Cocoa
return NSUserDefaults.standardUserDefaults().stringForKey(UserDefaultsConstants.iTunesStoreKey)!
}
}
/// If `true` the Search API Request adds the "lang=en" option.
public dynamic var useEnglishTags: Bool {
set {
NSUserDefaults.standardUserDefaults().setBool(newValue, forKey: UserDefaultsConstants.useEnglishTagsKey)
}
get {
return NSUserDefaults.standardUserDefaults().boolForKey(UserDefaultsConstants.useEnglishTagsKey)
}
}
/// If `true` the main table view will use 100x100 artworks instead of full
/// sized images. This option does not affect saving.