Skip to content

fix(Qobuz): restore missing GTIN check digits - #236

Open
floze-the-genius wants to merge 1 commit into
kellnerd:mainfrom
floze-the-genius:fix/qobuz-missing-upc-check-digit
Open

fix(Qobuz): restore missing GTIN check digits#236
floze-the-genius wants to merge 1 commit into
kellnerd:mainfrom
floze-the-genius:fix/qobuz-missing-upc-check-digit

Conversation

@floze-the-genius

Copy link
Copy Markdown

Summary

  • normalize legacy Qobuz UPC values that contain 13 payload digits but omit the GTIN-14 check digit
  • preserve Qobuz identifiers that already have a valid GTIN checksum
  • add focused regression coverage for both missing and valid check digits

Qobuz historically used the truncated UPC as the album ID for older releases. When that 13-digit value has an invalid checksum, this appends the calculated check digit before exposing it as the release GTIN. Valid identifiers are returned unchanged.

Fixes #228

Validation

Run with the repository CI version, Deno 2.4.5:

  • deno fmt --check (179 files)
  • deno lint (172 files)
  • deno task check
  • deno test --deny-net --allow-read --allow-env (37 passed, 598 steps)
  • deno task build
  • focused deno test -RE providers/Qobuz/mod.test.ts (28 steps)

@kellnerd

kellnerd commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Thank you for picking this up. I kind of left my feedback in #228 since I would like to confirm with the Qobuz experts what the proper solution should look like.

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

Labels

bug Something isn't working Qobuz

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Qobuz returns invalid UPC with missing check digit

2 participants