caarlos0 / discord-applemusic-rich-presence

Discord's Rich Presence from Apple Music
MIT License
24 stars 1 forks source link

Wrong album art #4

Closed CartoonChess closed 1 year ago

CartoonChess commented 1 year ago

Sorry this comes with so few details, but so far this consistently grabs the wrong album art.

Mind you, I've only tested it with a handful of albums from the same source: GameChops. Each track in the albums shows the same art, but it's always a different GameChops album. I wonder if this has anything to do with GameChops being less an artist than a label and thus creating some sort of confusion?

This is much more an FYI than a nitpick, though. Just really happy to have this working! Thanks for your hard work.

caarlos0 commented 1 year ago

hmm, it uses the itunes api to search.. if that returns the wrong album... not much I can do unfortunately :(

you can check with:

https://itunes.apple.com/search?term=###TERM##&limit=1&entity=song

Replace ###TERM### with artist+album+song, replacing spaces with +, and see what it is returning there... (check field ArtworkUrl100).

CartoonChess commented 1 year ago

Hmm, interesting. For reference:

As you say, though, there's probably not much to be done. Thanks for taking a look though!

caarlos0 commented 1 year ago

yeah, usually the most complete queries get the better results, but no good way to know for sure...

anyway, thank for raising the issue, will close it as discussed.

cheers!

CartoonChess commented 1 year ago

Just one thing to add—I found that by replacing ampersands (&) in the artist, album, and song with their percent-encoded equivalent (%24), the correct album art was returned instead. Perhaps this would improve results and avoid broken URLs? Something for reference, potentially. :)

caarlos0 commented 1 year ago

ahhh that might be yes! wanna PR it?

you can probably use url.QueryEscape(str)

caarlos0 commented 1 year ago

fixed, will release

CartoonChess commented 1 year ago

Great! Would've had issues fixing it myself honestly. It's working perfectly now. Thanks again!