diff --git a/TagTunes/Base.lproj/Main.storyboard b/TagTunes/Base.lproj/Main.storyboard
index b6faafe..ea3f5b9 100644
--- a/TagTunes/Base.lproj/Main.storyboard
+++ b/TagTunes/Base.lproj/Main.storyboard
@@ -502,11 +502,11 @@ CA
-
+
-
+
-
+
- This option one affects artwork displayed in TagTunes. Saved artwork will always have full resolution. Using this option may make searching faster but will also slow down saving.
-
+
@@ -535,7 +534,7 @@ CA
-
+
@@ -544,7 +543,7 @@ CA
-
+
@@ -563,7 +562,7 @@ CA
-
+
@@ -572,7 +571,7 @@ CA
-
+
@@ -583,12 +582,12 @@ CA
-
+
-
+
@@ -597,15 +596,46 @@ CA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -614,7 +644,6 @@ CA
-
@@ -624,7 +653,7 @@ CA
-
+
@@ -632,7 +661,7 @@ CA
-
+
diff --git a/TagTunes/Preferences.swift b/TagTunes/Preferences.swift
index 7489d7c..d73b3c6 100644
--- a/TagTunes/Preferences.swift
+++ b/TagTunes/Preferences.swift
@@ -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.
diff --git a/TagTunes/de.lproj/Main.strings b/TagTunes/de.lproj/Main.strings
index fba0dbc..acb141e 100644
--- a/TagTunes/de.lproj/Main.strings
+++ b/TagTunes/de.lproj/Main.strings
@@ -72,7 +72,7 @@
"M6p-MI-JS7.title" = "iTunes Store:";
/* Class = "NSTextFieldCell"; title = "This option one affects artwork displayed in TagTunes. Saved artwork will always have full resolution. Using this option may make searching faster but will also slow down saving."; ObjectID = "NMm-Jw-bon"; */
-"NMm-Jw-bon.title" = "Diese Einstellung ändert nur die Darstellung in TagTunes. Beim Speichern wird das Cover immer mit der höchsten Auflösung gesichert. Wenn diese Optiona aktiviert ist, werden Suchergebnisse schneller geladen, jedoch verlängert sich die Zeit beim Speichern.";
+"NMm-Jw-bon.title" = "Diese Einstellung ändert nur die Darstellung in TagTunes. Beim Speichern wird das Cover immer mit der höchsten Auflösung gesichert.";
/* Class = "NSMenuItem"; title = "Services"; ObjectID = "NMo-om-nkz"; */
"NMo-om-nkz.title" = "Dienste";
diff --git a/TagTunes/iTunes.swift b/TagTunes/iTunes.swift
index ead23b3..2ee41bb 100644
--- a/TagTunes/iTunes.swift
+++ b/TagTunes/iTunes.swift
@@ -129,7 +129,7 @@ public struct iTunesAPI {
if searchTerm.isEmpty {
return nil
}
- return NSURL(string: "https://itunes.apple.com/search?term=\(searchTerm)&media=music&entity=album&limit=\(Preferences.sharedPreferences.numberOfSearchResults)&country=\(Preferences.sharedPreferences.iTunesStore)")
+ return NSURL(string: "https://itunes.apple.com/search?term=\(searchTerm)&media=music&entity=album&limit=\(Preferences.sharedPreferences.numberOfSearchResults)&country=\(Preferences.sharedPreferences.iTunesStore)" + (Preferences.sharedPreferences.useEnglishTags ? "&lang=en" : ""))
}
/// Creates an URL that looks up all tracks that belong to the album with the
@@ -138,7 +138,7 @@ public struct iTunesAPI {
///
/// This function respects the user's preferences (See `Preferences` class).
public static func createAlbumLookupURLForId(id: iTunesId) -> NSURL {
- return NSURL(string: "http://itunes.apple.com/lookup?id=\(id)&entity=song&country=\(Preferences.sharedPreferences.iTunesStore)&limit=200")!
+ return NSURL(string: "http://itunes.apple.com/lookup?id=\(id)&entity=song&country=\(Preferences.sharedPreferences.iTunesStore)&limit=200" + (Preferences.sharedPreferences.useEnglishTags ? "&lang=en" : ""))!
}
}