derat/yambs

Avoid doing two MBID lookups for each Tidal artist

derat opened this issue · 2 comments

derat commented

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

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

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