Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last.fm Artist Lookup not sanitizing special characters in Artist's names #472

Closed
flkdnt opened this issue Feb 18, 2024 · 4 comments
Closed

Comments

@flkdnt
Copy link

flkdnt commented Feb 18, 2024

gonic version:v0.16.2
if from docker, docker tag: latest

Hello,

I've noticed that the Last.fm Artist lookup will fail(rendering a default image) in the following cases:

  1. An en-dash/em-dash in the artist's name, i.e. Eagle‐Eye Cherry :

Sent URL(This isn't pasting correcting into Github) : https://www.last.fm/music/Eagle%E2%80%90Eye+Cherry
Correct URL: https://www.last.fm/music/Eagle-Eye+Cherry

  1. An apostrophe in the artist's name, i.e. Destiny’s Child :

Sent URL(This isn't pasting correcting into Github): https://www.last.fm/music/+noredirect/Destiny%E2%80%99S+Child
Correct url: https://www.last.fm/music/Destiny's+Child or https://www.last.fm/music/Destiny%27s+Child

  1. Certain Artists with initials and periods, i.e. D.J. Jazzy Jeff & The Fresh Prince :

Sent URL: https://www.last.fm/music/+noredirect/D.J.+Jazzy+Jeff+&+the+Fresh+Prince
Correct URL: https://www.last.fm/music/DJ+Jazzy+Jeff+&+The+Fresh+Prince

  1. Certain Artists with Foreign Names, i.e. Cédric Gervais :

Sent URL: https://www.last.fm/music/C%C3%A9dric+Gervais
Correct URL: https://www.last.fm/music/Cedric+Gervais

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

hm i definitely dont seem to have this issue. where are you getting the "Sent URL" links that you posted?

image
image
image
image

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

ah i see what the issue is, for example taking Destiny’s Child, the apostropy is a right single quotation mark (0x2019), if we visit that page (and prevent the auto redirect) you can see there is indeed no art for that artist

https://www.last.fm/music/+noredirect/Destiny%E2%80%99s+Child

the correct artist name is with a normal apostrophe (0x27)

https://www.last.fm/music/Destiny%27s+Child

maybe gonic could try follow those redirects

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

seems to work now with 2878b88

this will be availble in the docker :nightly image which builds in a few hours

to clear your local artist info cache for relevant entries try

$ sqlite3 path/to/gonic/gonic.db "delete from artist_infos where id in (select id from artists where name like '%‐%' or name like '%’%' or name like '%“%')"

and also delete your gonic cover cache dir

image

@flkdnt
Copy link
Author

flkdnt commented Feb 24, 2024

Thank you @sentriz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants