Last.fm Artist Lookup not sanitizing special characters in Artist's names
flkdnt opened this issue · 4 comments
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:
- 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
- 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
- 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
- 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
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
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