Repository navigation
nightly-9501e085-ls12
Pre-releaseCI
LinuxServer changes
Full Changelog: nightly-029ac6f3-ls11...nightly-9501e085-ls12
Upstream changes
Source: beetbox/beets@9501e08
importer: use library field names for duplicate detection of applied matches (#7156)
Fixes #7067.
ImportTask.chosen_info() returned the raw AlbumInfo/TrackInfo dict
for an applied match. Its keys use the metadata-source names
(album_id, track_id), not the library field names, so a
duplicate_keys entry such as mb_albumid or mb_trackid was always
empty on the temporary Album/Item and never matched an existing
entry.
For Action.APPLY, chosen_info() now returns a copy of
match.info.item_data, the existing mapping to library field names
(album_id -> mb_albumid, artist -> albumartist, ...). The copy
stays because item_data is cached and find_duplicates mutates the
dict. ImportTask.find_duplicates only copies artist to albumartist
on the as-is path, since the mapped dict already carries albumartist.
An applied match with no artist has no albumartist (item_data drops
None) and the duplicate check is skipped.
Two tests in test/test_importer.py (album with mb_albumid, singleton
with mb_trackid) fail before the mapping change and pass after it. A
third applies an album match with artist=None and expects no
duplicate.
To Do
-
Documentation. - Changelog.
- Tests.
This pull request was prepared with the assistance of an AI coding agent
and submitted by Alex Castillo, who is responsible for its content.