Hello @svobpata,
Thank you for the feedback on the unexpected data you're getting in the artwork of a MusicPlayer.Queue.Entry.
By and large, what you see there is just as expected, with the exception of the the maximumWidth and maximumHeight set to 0.
Feel free to file a ticket on Feedback Assistant about this specific issue.
That said, I would encourage you to load the artwork with something along those lines:
if let artworkURL = artwork.url(width: 300, height: 300) {
let (artworkImageData, _) = try await URLSession.shared.data(from: artworkURL)
updateArtworkImageView(with: artworkImageData)
}
where updateArtworkImageView is defined as:
private func updateArtworkImageView(with artworkImageData: Data) {
artworkImageView.image = UIImage(data: artworkImageData)
}
Despite the unusual look of the underlying URL, this is designed to work just fine when you pass this URL to URLSession.
As for the ergonomics of using these APIs with UIKit, I hear you, but we are definitely focused on making MusicKit for Swift easy to use with SwiftUI first and foremost.
For example, you can always use MusicPlayer.Queue's objectWillChange publisher to get notified of changes to the playback queue.
I hope this helps.
Best regards,