NextFire / apple-music-discord-rpc

🎵 Discord Rich Presence Client for the macOS Apple Music app and iTunes
MIT License
559 stars 37 forks source link

Random album artwork on certain local tracks #46

Closed strafe closed 1 year ago

strafe commented 1 year ago

Both tracks shown below are local tracks, one seems to somehow be linked to an Apple Music/iTunes track. Here is a direct link to the album artwork that is being shown.

Clicking Play on Apple Music does nothing, but it doesn't seem to work for Apple Music tracks either in my case.

CleanShot 2023-01-01 at 21 30 22@2x CleanShot 2023-01-01 at 21 31 14@2x

macOS 12.4 Discord Stable

strafe commented 1 year ago

Seems this is where it's grabbing the artwork from. Note that there are a few similar(?) fields. The artist of my track is namu and the album is vol. III.

strafe commented 1 year ago

I had a look at why it's happening, my two cents would be to calculate the Levenshtein distance between the artist name and or album name and decide on a threshold to confirm if it's a match. As NAMU PLANE is quite far from namu.

NextFire commented 1 year ago

The matching is made by a "quite dumb" search of ${artist} ${album} on the iTunes API. This sometimes leads to wrong results and unfortunately there is no easy solution besides maybe a better tagging of your tracks to exactly match the ones on Apple Music.

strafe commented 1 year ago

These tracks aren't on Apple Music/iTunes so it would never be possible to point it towards the correct track. Probably out of the scope of this project, but the ability to upload local track artwork to a image hosting site and use that URL for the icon would be a neat addition