I use the XML API to retrieve information from the database. This has been working pretty solidly (timeouts excluded) for the past several years. I haven’t made any changes to my code in months, but noticed a few days ago that I wasn’t getting track information from releases for some reason. Here’s a quick example. I run a query for Childish Gambino’s new album and get a list of REID’s the first of which is “d65b6db8-2ed9-409a-8d19-af8e6953e6a6”. I want to run a query to get all the recordings on that release so I hit this end point:
Which is clearly not correct. There are recordings associated with that release. What gives?
Sometimes I see this happen for all releases of an album, sometimes it’s just a few and the others work correctly. It’s definitely a new problem though.
You know the release and you want to find the recordings on that release.
You do that with the inc=recordings
Try the following to get the recordings on that release.
The first query is a search, handled by a separate backend. It’s not unimaginable that there is a technical issue with the search server; a lookup or browse request should be more reliable in any case.
So apparently I’ve been doing this wrong the whole time. Sure, it ought to work (and has for at least 5 years) but the query I was doing was stupid. All I care about with my tagger outside the specific release information is the number of discs, the songs on each disc and their lengths. Won’t need to make any further requests and I’ll have a lot less XML to parse through.
Thanks dns_server. I have to rewrite a bunch of code, but the end result is going to be a lot cleaner (and I can get rid of a bunch of weird corner cases). Thanks!