[Bug] Apple Music Rich Presence shows track ranked first rather than the one actively playing
What happens when the bug or crash occurs?
There is a bug causing incorrect links and artwork to return in the Apple Music Rich Presence plugin.
fetchRemoteData in src/plugins/appleMusic.desktop/native.ts selects with .find(song => song.collectionName === album), which returns whichever track of that album the API ranked first rather than the one playing. It puts the wrong song when that album's listing doesn't include the track being played. .find() then returns some other song from the right album, instead of the right song sitting a few results lower in a different album edition.
The app opens a link as seen in the screenshot, and you can see it has the incorrect Track ID. [track id is 6802879639 - searching that ID returns Butterflies, not Stay. https://itunes.apple.com/lookup?id=6802879639
The song title renders correctly, only the artwork and links are wrong. The match should weigh the track name and not album alone.
What is the expected behaviour?
The artwork and links should point at the track being played.
How do you recreate this bug or crash?
- play the song "Stay" on Mac Miller's album The Divine Feminine (10th Anniversary)
- click on the links to launch apple music
- get directed to the wrong song / verify in the URL the wrong track ID is presented (you can use this URL: https://itunes.apple.com/lookup?id=#####) replace ID ###
Errors
Replace this text with your crash-log.Request Agreement
- I've searched existing issues and this hasn't been reported before
- I am using Discord Stable or tried on Stable and this bug happens there as well
- I installed Vencord via an official method (download from vencord.dev or from source), not via something like AUR or Nix packages
- This is not a support request (as defined above)
- I understand that if any of the above conditions are not met, this issue will be deleted and I will be banned from creating future issues without further warning
- I am willing to submit a fix for this myself
Source: Vendicated/Vencord