Post

Replies

Boosts

Views

Activity

Comment on Get Songs from Apple Music API recently added
Hi @snuff4, I finally got back around to this and your struct does work, thanks! I do have to do the following to get the albums into a from I can work with of the playlist: let albums = items.compactMap{$0.relationships.catalog.compactMap{$0}}.flatMap{$0} This is probably because I'm too lazy and dumb on Swift. Frankly the whole reason I'm doing this is because of what I think is a bug in the iOS Music app, which I've asked the ever-helpful @JoeKun to check out here. And after going through this exercise, I realize that "recently added" isn't going to help, because what I want to do is check recently added for songs that do not exist in certain user library playlists. And since I can only get Albums, followed by subsequent API calls to get Tracks from said Albums, I can only know if there is an intersection of playlist tracks with the recently added album tracks, which lets me ask: "What are the tracks in recently added that are not in this particular playlist", but results in potentially all of the recently added album tracks that I don't care about. I wish Recently Added had an option for tracks, and I think I'm not alone with that sentiment.
May ’22