Do we have a script that will import a release into MB?
Thereās one in murdosā repository: https://github.com/murdos/musicbrainz-userscripts/raw/master/qobuz_importer.user.js
Iām not sure whether it still works though.
Nope, it doesnāt. Thanks thoughā¦I was hoping another might be available since I was thinking of buying hi-res music by track instead of whole albums.
Nope. Broken. Thereās no public Qobuz API either, so the only hope to even know 100% if you have the correct matching releases to other services is if they have the barcode in the URL, which they sometimes do. There is an API, but unfortunately, you have to be a paying member to Qobuz to use it.
There is an API, but unfortunately, you have to be a paying member to Qobuz to use it.
If you just need album information, you donāt need to have an account, just an āapp IDā. Itās possible to find one of Qobuzā own app ID by inspecting the network requests happening on open.qobuz.com album pages. The one used there hasnāt changed for several years.
I was only going off what another editor told me that has access to the API. I canāt even find where the API is or how to access it. The only one I can find by a search appears to not even exist anymore.
Some pointers for anyone interested in creating a new Qobuz importer or fixing the existing one, the Qobuz provider in Enhanced Cover Art Uploads contains some code to get album metadata from their API. Unfortunately itās only accessible from an IP in a country where the release is available. It also appears that release countries can be extracted from the alternate URLs present in the HTML <head>
element on www.qobuz.com
pages (document.querySelectorAll('head > link[rel="alternate"]')
): fy3ginyk9q1wa lists only US, AU, and NZ; whereas 0825646184729 (same album, different ID) lists a whole bunch of European countries, but not US, AU, or NZ.
I still donāt get it, but if anyone can just find a way to get barcodes the rest is easy.
anyone else using the qobuz api to find the barcode? Iām wondering why sometimes the api gives an 404 error when giving it a valid release id.
for example:
when using the api call it returns 404:
https://www.qobuz.com/api.json/0.2/album/get?app_id=***&album_id=a7fd1jk60x1gb
is there an alternate method to find the upc in these cases? I usually look on other digital distribution sites when this happens and try to match the release. but in this particular case this is the only digital platform I could find which features this release with the Glassnote label.
Are you specifying a region in your API requests?
This release is only available in CA, MX and US, so the API might 404 for a different (implicitly) requested region.
(I havenāt used their API nor do I have a key, so I canāt confirm.)
to my knowledge there is no way to give the api a region parameter. but you bring up a good point. I havenāt thought of it that maybe the api is discriminating the region of your IP. I donāt live in one of these countries so that might be the issue. I will try it again with a VPN.
edit: nope, still the same issue even with an IP from one of these countries.
edit2:
never mind, the browser cache was at fault here. so it loaded the previous 404 result even with a valid IP. flushed the cache and voila, it works now with a VPN.
figured it out. when using a valid IP and calling the streaming site for this album release, so in this case
https://open.qobuz.com/album/a7fd1jk60x1gb
you can view the api result in the network monitor of your browser. in the case of Firefox, open the network monitor with Ctrl+Shift+E before loading the page. after loading it, look for the get?album-line, click on it and you get the api result in the āanswerā tab.
and there it is:
upc ā0044003202153ā
weirdly enough, it doesnāt work when loading the api call in the browser itself. but we have a solution now.
edit:
realized that the cache was at fault here. so the api call also works when using it directly with a valid IP for the particular release. just make sure that you flush the browser cache beforehand or it will still show you the previous error result from the invalid IP.
nice, based on that - my browser has come up with an app ID of 712109809
so this one liner is working for me to get the UPC
$ curl -s 'https://www.qobuz.com/api.json/0.2/album/get?album_id=g92m3z1ag5gva' -H 'X-App-Id: 712109809' | jq -r '.upc'
3770004998838
Is their a Qobuz script for Tampermonkey/Violentmonkey?
No, unfortunately there is not one specifically. I use Yambs (https://yambs.erat.org/) as an importer. Qobuz releases are almost always on other services that have scripts, especially HDtracks. If you follow the conversation immediately above it will tell you the UPC for Qobuz. It works.
Thanks for pointing out the API! Iāve updated yambs to use it to seed barcodes for Qobuz albums. Please let me know if you notice any problems (ideally via Issues - derat/yambs - Codeberg.org).
Working great for me.
try this yambs (erat.org)
Thanks for this. I just wanted to add that for those having some difficulty I found that I didnāt have an āAnswersā tab in Firefox, rather a āResponsesā tab. Maybe this is a localization issue? Iām in Australia and it might be an English (Australian/UK) thing.
I also found that for me there are two āget?album_id=(ā¦etcā¦)ā request lines, and the one I needed was the one which has in its āInitiatorā column containing āmain.js?:7(fetch)ā. I had a second entry with just āfetchā that I took some time wandering through that wondering why the Responses section had no data until I noticed the other entry above it and found the UPC data in there.