{{ message }}
Repository navigation
Conversation
ImportTask.chosen_info() was returning self.match.info.copy() for APPLY actions, which preserves raw AlbumInfo/TrackInfo field names (album_id, track_id) instead of the library model names (mb_albumid, mb_trackid). find_duplicates() then built a temporary Album/Item with mb_albumid unset, causing the duplicate query to match library entries with an empty MBID rather than the real duplicate. Fix chosen_info() to return dict(self.match.info.item_data) for APPLY actions. item_data applies MEDIA_FIELD_MAP which translates all AlbumInfo/TrackInfo field names to their library equivalents, so find_duplicates() now builds the temporary model with the correct fields including mb_albumid and mb_trackid. Also update ImportTask.find_duplicates() to handle the renamed artist field: AlbumInfo.item_data maps 'artist' -> 'albumartist', so the albumartist override is now guarded by a check for the 'artist' key (present for ASIS/RETAG paths, absent for APPLY after item_data). Add regression tests for both album (mb_albumid) and singleton (mb_trackid) duplicate key paths. Fixes beetbox#7067
hippi345
marked this pull request as ready for review
October 5, 2026 09:57
When AlbumInfo.artist is None, item_data omits 'albumartist' entirely
(None values are filtered during item_data construction). The guard
if info.get("albumartist") is None: return []
was previously uncovered. Add a focused unit test that constructs an
APPLY task with an artist-less AlbumMatch and asserts find_duplicates
returns [] immediately.
hippi345
marked this pull request as draft
October 5, 2026 10:10
hippi345
marked this pull request as ready for review
October 5, 2026 17:41
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #7067
chosen_info() now uses match.info.item_data so library field names (mb_albumid/mb_trackid) are set for find_duplicates; albumartist override guarded for APPLY; changelog + album/singleton regression tests.