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

@@ -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=de&lang=de_DE")
return NSURL(string: "https://itunes.apple.com/search?term=\(searchTerm)&media=music&entity=album&limit=\(Preferences.sharedPreferences.numberOfSearchResults)&country=\(Preferences.sharedPreferences.iTunesStore)")
}
/// 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=de&lang=de_DE&limit=200")!
return NSURL(string: "http://itunes.apple.com/lookup?id=\(id)&entity=song&country=\(Preferences.sharedPreferences.iTunesStore)&limit=200")!
}
}