Skip to content

fix(Deezer): Deduplicate release and track contributors - #260

Open
chaban-mb wants to merge 1 commit into
kellnerd:mainfrom
chaban-mb:fix/deezer-duplicate-artists
Open

chaban-mb wants to merge 1 commit into
kellnerd:mainfrom
chaban-mb:fix/deezer-duplicate-artists

Conversation

@chaban-mb

@chaban-mb chaban-mb commented Sep 13, 2026 •

Copy link
Copy Markdown

Note

Drafted with AI assistance.

Summary

Fixes #183 by deduplicating contributors by artist ID in convertRawRelease and convertRawTrack.

Background & Problem

Deezer's API frequently lists the same artist multiple times in contributors (notably for slowed, sped-up, or remixed variants) — once with "role": "Main" and once with "role": "Featured".
Because track.contributors was mapped directly without deduplication, duplicate artist credits were created for those tracks (e.g. MoonDeity, Archez, MoonDeity or Shibuya Nasu, Pakto, Shibuya Nasu & Pakto).

Solution

  • Use distinctBy from @std/collections/distinct-by on rawRelease.contributors and track.contributors keyed on artist id.
  • Because Deezer lists Main contributors before Featured contributors in its response, preserving the first-seen occurrence naturally retains the Main entry and eliminates the redundant duplicate.
  • Added test coverage and cached testdata for both example releases reported in Deezer tracklists can have duplicate artists #183 (792408001 and 1034546172).

Deezer's API frequently lists the same artist multiple times in
contributors (e.g. once as 'Main' and once as 'Featured' for slowed,
sped-up, or remixed variants). Deduplicate contributors by artist ID
to preserve the first occurrence ('Main') and eliminate duplicate credits.

Closes kellnerd#183
@chaban-mb
chaban-mb marked this pull request as ready for review September 13, 2026 19:31
@kellnerd kellnerd added bug Something isn't working Deezer labels Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Deezer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deezer tracklists can have duplicate artists

2 participants