beets/beets
Axel Wikström b5d8ced9d9 Enable duplicate detection for as-is imports
When importing with autotag=no, duplicate detection was skipped entirely
because the import_asis stage called _apply_choice() directly without
first calling _resolve_duplicates(). This meant the duplicate_keys and
duplicate_action config options were ignored for as-is imports.

This was a known limitation documented by a FIXME comment added in
commit 79d1203541 (Sep 2014): "We should also resolve duplicates when
not autotagging." The FIXME was later removed during a comment cleanup
(f145e3b18) but the issue was never addressed.

This commit adds the _resolve_duplicates() call to import_asis, ensuring
duplicate detection works consistently regardless of the autotag setting.
This applies to both album imports and singleton imports.

Test changes:
- Renamed test_no_autotag_keeps_duplicate_album to
  test_no_autotag_removes_duplicate_album to verify the corrected behavior
- Added test_no_autotag_removes_duplicate_singleton to verify singleton
  duplicate detection also works with autotag=no

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-04 14:26:13 +00:00
..
autotag Keep missing multi-value fields as None instead of empty list 2026-03-03 07:48:51 +00:00
dbcore Only add fields when we create new table 2026-02-28 10:06:31 +00:00
importer Enable duplicate detection for as-is imports 2026-03-04 14:26:13 +00:00
library Document ordering of the genre split separator 2026-02-27 18:36:04 +00:00
test Fix the rest of the tests 2026-02-27 18:34:26 +00:00
ui Fix lint 2026-03-03 12:06:12 +00:00
util fix: sort imports 2026-01-16 15:53:34 +05:30
__init__.py Increment version to 2.6.2 2026-02-22 16:04:40 +00:00
__main__.py
config_default.yaml Added default config and simplified proxy class. 2026-01-31 23:42:09 +00:00
logging.py Configure ruff for py310 2026-01-13 20:55:40 +00:00
mediafile.py Centralise warnings for maintainers into deprecate_for_maintainers 2025-11-30 07:02:46 +00:00
metadata_plugins.py Use a decorator-based approach 2026-01-31 23:42:09 +00:00
plugins.py Adapt code to fully typed confuse library 2026-02-16 12:45:05 +00:00
py.typed Add py.typed marker file to support PEP 561 typing (#5906) 2025-08-09 13:31:55 +02:00