I'm hopeful, that the blow may work, but I'm waiting on an iOS16 device to test on:
@available(iOS 16.0, *)
func getCuratorPlaylistsFromPlaylist2(playlistId: String) async throws -> String? {
do {
var request = MusicCatalogResourceRequest<MusicKit.Playlist>(matching: \.id, equalTo: MusicItemID(playlistId))
request.properties = [.curator] // adding curator to the request
let response = try await request.response()
Logger.log(.success, "Playlists Response: \(response.items)") // this is a collection of playlists, as expected.
Logger.log(.info, "Playlists Item Count: \(response.items.count)") // this is always 1, as expected
for item in response.items {
Logger.log(.info, "Item: \(item)") // shows the playlist's id, name, curatorName, and maybe more with .curator added
Logger.log(.info, "Type of Item: \(type(of: item))") // type is Playlist
if let curatorPlaylists = item.curator?.playlists {
Logger.log(.info, "Curator Playlists: \(curatorPlaylists)") // hopeful here!
} else {
Logger.log(.warning, "No Curator Playlists!")
}
}
} catch {
// handle error
Logger.log(.error, "Could not findCuratorOfPlaylist \(error)")
}
return nil
}