I am trying to offer my users a wide variety of playlists, like Apple Music does in the "explore" section.
I fetched the charting playlists for the current storefront, but that's as far as I get. For example, I fetch the top charts genres first. If a user selects a genre I want to display the playlists for this genre, so I call the charts endpoint with the genre as the id but I can't get a response.
path = "/v1/catalog/\(storefrontID)/charts"
components.queryItems = [
URLQueryItem(name: "types", value: "playlists"),
URLQueryItem(name: "chart", value: "most-played")
]
if let id = id {
let genreQuery = URLQueryItem(name: "genre", value: id)
components.queryItems?.append(genreQuery)
}
Even weirder, I get exactly one genre "Musik" (which isn't a genre) with identifier "34" and storefrontId "de" where it works and I get my playlists. All other genre return empty responses.
I try to use AppleMusic API with MusicKit as an addition, but there doesn't seem to be a solution for this problem either.