Commit Graph

9 Commits

Author SHA1 Message Date
Sebastian Mohr
54a2bd20e1 Removed This file is part of beets... headers. 2026-06-29 11:20:15 +02:00
Šarūnas Nejus
949f987368 Exclude chroma tests when unimportable 2026-06-13 01:46:44 +01:00
Sebastian Mohr
7a894fc532 chroma: ImportTestCase -> ImportHelper 2026-06-11 10:39:14 +02:00
Šarūnas Nejus
648f24cbc2 Enable and fix flake8-builtins 2026-06-09 00:14:06 +01:00
Šarūnas Nejus
29580d2f00 Import everything from parent beets.autotag 2026-06-02 08:57:35 +01:00
Andrew Yang
4f3e8907c4 test(chroma): consolidate gating tests into a single class
Per @snejus review feedback on #6532: merge TestChromaWithoutMusicBrainz
and TestChromaWithMusicBrainz into a single TestChromaCandidates class
with the motivating comment moved into its docstring. Test method names
now encode the 'without' / 'with' variant.
2026-04-15 00:03:23 +01:00
Andrew Yang
e446554211 chroma: address review feedback
- Use @cached_property named `mb` (per snejus/semohr) instead of a
  helper method, reducing the diff relative to the original code
- Move changelog entry to the Unreleased section (per snejus)
- Refactor tests to use PluginMixin from beets.test.helper (per
  semohr) instead of manually managing beets.plugins._instances
2026-04-15 00:03:23 +01:00
Andrew Yang
692ef4a923 chroma: gate candidates on the musicbrainz plugin being enabled
The chroma plugin uses Acoustid fingerprinting, which returns MusicBrainz
release and recording IDs. It then unconditionally resolved those IDs
through a privately instantiated MusicBrainzPlugin, so MusicBrainz-sourced
candidates appeared during tagging even when the user had not enabled the
musicbrainz plugin.

Replace the direct MusicBrainzPlugin() instantiation with a lookup through
the metadata-source registry via get_metadata_source("musicbrainz"). When
that returns None, short-circuit both candidates() and item_candidates()
to return empty. This also fixes an incidental issue where the private
instance bypassed any plugin that swaps the musicbrainz plugin at runtime
(e.g. mbpseudo).

Acoustid fingerprinting itself is unaffected — acoustid_id and
acoustid_fingerprint item fields are still populated as before.

Fixes #6212
2026-04-15 00:03:23 +01:00
ShimmerGlass
1242f42b37 feat(chroma): add chromasearch command
This command lets user search the database by chromaprint fingerprint
similarity.
Database item fingerprints are computed on the fly if needed.
This is useful for example to check if an unknown / untagged audio file
already exists in the database.
2026-04-04 15:03:42 +02:00