Skip to content

feat(qobuz): Implement Qobuz provider#206

Open
Lioncat6 wants to merge 13 commits intokellnerd:mainfrom
Lioncat6:qobuz
Open

feat(qobuz): Implement Qobuz provider#206
Lioncat6 wants to merge 13 commits intokellnerd:mainfrom
Lioncat6:qobuz

Conversation

@Lioncat6
Copy link
Copy Markdown

@Lioncat6 Lioncat6 commented Apr 3, 2026

Closes #189

@Lioncat6
Copy link
Copy Markdown
Author

Lioncat6 commented Apr 3, 2026

~~Tests seem to fail with a server error 500 for whatever reason, but lookups are running fine outside of tests. Perhaps the test command I'm using is incorrect: deno test --allow-net --allow-write --allow-env ./providers/Qobuz/mod.test.ts -- --download

Edit: seems the environment variables aren't loading properly during the test~~

Forgot to specify .env path :p

deno test --allow-net --allow-write --allow-read --allow-env ./providers/Qobuz/mod.test.ts -- --download --update

@Lioncat6 Lioncat6 mentioned this pull request Apr 3, 2026
17 tasks
@Lioncat6
Copy link
Copy Markdown
Author

Lioncat6 commented Apr 3, 2026

Just realized eti isn't included in track titles

Copy link
Copy Markdown
Owner

@kellnerd kellnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, this is looking good already!
I've got a couple of comments nevertheless. These are only based on reading the code, I will come back once I've tested the provider with a couple of releases (but that will have to wait until I'm done with my Discogs provider testing).

P.S. The formatter doesn't like your API interface definitions, please fix with deno fmt. You can locally check that CI (except tests) passes by running deno task ok.


readonly supportedUrls = new URLPattern({
hostname: '(play|www|open).qobuz.com',
pathname: '/:region?/:type(artist|album|track|interpreter|label)/:slug?/:id',
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't call the combination of country and language code :region here, it will cause problems for other providers which only expect a country code as region. The simplest solution would be to call the group :locale and be done with it, but this doesn't provide much value.
Alternatively we can extract two named groups :region and :language, which makes the region usable for other providers, but requires us to define a mapping between regions and default languages (for incoming regions from other providers or the web input where we don't know the language).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using locale group for now...

"paid streaming",
"paid download",
],
url: "https://www.qobuz.com/fr-fr/album/suspend-my-belief-ivycomb-stephanafro/rjrikcvbggy0b",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very familiar with Qobuz URL formats and which one is accepted on MB.
I only noticed that you are seeding the localized www URL here while the provider tests consider the non-localized open URLs without slug as canonical. Is there a reason for that discrepancy?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All qobuz links are currently accepted on MB since there's no cleanup for them. The old www.qobuz links are the only ones displayed in the sidebar currently. I personally prefer the open.qobuz links for a couple reasons, so I'll likely switch to using those.

See https://tickets.metabrainz.org/browse/MBS-13611

@kellnerd kellnerd added feature New feature or request provider Metadata provider labels Apr 3, 2026
@Lioncat6 Lioncat6 requested a review from kellnerd April 5, 2026 02:31
Copy link
Copy Markdown
Owner

@kellnerd kellnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deno test --allow-net --allow-write --allow-read --allow-env ./providers/Qobuz/mod.test.ts -- --download --update

Quick tips:

  1. You can abbreviate the allow flags with -NWRE.
  2. Usually you want either the --download or the --update flag (or none of them most of the time).
  3. --download should be rarely enabled after all the testdata has been cached once because responses often cause irrelevant noise for git because of unstable sort order (like your Qobuz search response changing with every commit :/) or irrelevant properties (like popularity) changing their values.
  4. You should only --update the snapshots if there was an intended change that caused an assertion error, otherwise it will always update and swallow unintended breaking changes.

}],
externalLinks: [{
url: rawRelease.url,
types: this.provider.getLinkTypesForEntity(),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why you are not using the streamable and downloadable properties here?

P.S. I thought this was part of my first review already, but apparently I forgot to hit the "Add review comment" button and GH remembered it until now 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request provider Metadata provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Qobuz implementation

2 participants