derat / yambs

Moved to codeberg.org/derat/yambs
https://codeberg.org/derat/yambs
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Avoid doing two MBID lookups for each Tidal artist #20

Closed derat closed 1 year ago

derat commented 1 year ago

sources/online/tidal/tidal.go currently looks up both https://tidal.com/artist/<id> and https://listen.tidal.com/artist/<id> in MusicBrainz to try to find a given Tidal artist's MBID, since I've seen relationships using both forms.

I think that this code in the MB server tries to normalize Tidal URLs to just use tidal.com:

https://github.com/metabrainz/musicbrainz-server/blob/5856335ba8a224e7010f7b3a6f26aca686f1a06f/root/static/scripts/edit/URLCleanup.js#L4600-L4604

I'm guessing that the listen.tidal.com relationships could've been entered before the server started normalizing the URLs (which 37d4ea835e014649afc686ba7022f61971e328e3 implemented, I think). Some relevant links:

It'd be nice to only do a single lookup, but I don't know if there's any way to do so besides cleaning up all of the relationships in the DB.

derat commented 1 year ago

For better or worse, I'm embarking on the task of cleaning up the database:

It looks like there are a bit over 12,000 URLs, so it'll take a while.

derat commented 1 year ago

I stopped looking up listen.tidal.com URLs in 5f3791fdde36b063e8039d25af75d15d65c5ba88.