I am fetching playlist songs from the users library and also need the releaseDate (or year) for the song for my use case. However, the releaseDate is always nil since I have upgraded to sequoia. I am pretty sure, this was working before the upgrade, but I couldn't find any documentation on changes related to this.
Furthermore I noticed, the IDs also now seem to be the catalog IDs instead of the global ones like i.PkdZbQXsPJ4DX04
Here's in a nutshell what I am doing
func fetchSongs(playlist: Playlist) async throws {
let detailedPlaylist = try await playlist.with([.tracks])
var currentTracks: MusicItemCollection<Track>? = detailedPlaylist.tracks
repeat {
for track in currentTracks! {
guard case .song(let song) = track else {
print("This is not a song")
continue
}
print(song.releaseDate)
}
currentTracks = try await currentTracks?.nextBatch()
} while currentTracks != nil
}