Skip to content

feat(duplicates): add chroma plugin integration#6624

Open
ShimmerGlass wants to merge 1 commit into
beetbox:masterfrom
ShimmerGlass:dup-chroma
Open

feat(duplicates): add chroma plugin integration#6624
ShimmerGlass wants to merge 1 commit into
beetbox:masterfrom
ShimmerGlass:dup-chroma

Conversation

@ShimmerGlass
Copy link
Copy Markdown
Contributor

Description

When the chroma plugin is enabled, the duplicates plugin can now make use of
its sonic fingerprinting capabilities to compare the tracks audio in addition of
their keys. This is especially useful when multiple versions of a song, such
as live or remixes exist in the library.

When the option is enabled, tracks with the same keys but different audio
will be excluded from the results.

The following additional options are available when the chroma plugin is
enabled:

  • chroma: Enable fingerprint comparison during duplicate search
  • chroma_threshold: Threshold, from 0 to 1, to consider track audio the
    same. 1 means an exact match; 0 nothing alike. Default: 0.9.

To Do

  • Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • Tests. (Very much encouraged but not strictly required.)

@ShimmerGlass ShimmerGlass requested a review from a team as a code owner May 10, 2026 16:09
@ShimmerGlass ShimmerGlass changed the title Dup chroma feat(duplicates): add chroma plugin integration May 10, 2026
@github-actions github-actions Bot added the chroma chroma plugin label May 10, 2026
@ShimmerGlass ShimmerGlass added the duplicates duplicates plugin label May 10, 2026
@ShimmerGlass ShimmerGlass force-pushed the dup-chroma branch 2 times, most recently from 8646dc0 to 5992bd1 Compare May 10, 2026 16:15
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

❌ Patch coverage is 71.96262% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.38%. Comparing base (0309096) to head (11d12ca).

Files with missing lines Patch % Lines
beetsplug/duplicates.py 75.00% 11 Missing and 11 partials ⚠️
beetsplug/chroma.py 53.84% 3 Missing and 3 partials ⚠️
beets/plugins.py 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6624   +/-   ##
=======================================
  Coverage   72.38%   72.38%           
=======================================
  Files         159      159           
  Lines       20645    20689   +44     
  Branches     3269     3280   +11     
=======================================
+ Hits        14944    14976   +32     
- Misses       4976     4982    +6     
- Partials      725      731    +6     
Files with missing lines Coverage Δ
beets/plugins.py 87.09% <66.66%> (-0.51%) ⬇️
beetsplug/chroma.py 46.95% <53.84%> (+0.33%) ⬆️
beetsplug/duplicates.py 53.15% <75.00%> (+4.67%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

with chroma enabled, add the option to compare tracks fingerprints when
duplicates are found to remove tracks with different audio from the
results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chroma chroma plugin duplicates duplicates plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant