-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
Problem
While fixing #6178 I discovered another problem: apparently we do not take into account
the data_source field when we check whether an incoming candidate is a duplicate.
I have a test that reproduces this issue (included the data source in the logs for clarity):
===================================================================================== FAILURES =====================================================================================
_________________________________________________________________ TestGetAlbumMultipleDataSources.test_search_ids __________________________________________________________________
self = <test.autotag.test_match.TestGetAlbumMultipleDataSources object at 0x7fb73532e560>, shared_id = 'album-12345'
def test_search_ids(self, shared_id):
_, _, proposal = match.tag_album([Item()], search_ids=[shared_id])
sources = [
candidate.info.data_source for candidate in proposal.candidates
]
> assert len(sources) == 2
E AssertionError: assert 1 == 2
E + where 1 = len(['Deezer'])
test/autotag/test_match.py:148: AssertionError
------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------
Tagging -
Searching for album ID: album-12345
Sending event: albuminfo_received
Candidate: Albumartist - Album (album-12345) from Deezer
Computing track assignment...
...done.
Success. Distance: 1.00
Sending event: album_matched
Sending event: albuminfo_received
Candidate: Albumartist - Album (album-12345) from Discogs
Duplicate.
Sending event: album_matched
Evaluating 1 candidates.I cannot reproduce this with my library data because (apparently) discogs plugin returns AlbumInfo.album_id field as an integer while deezer returns a string 😁.
Setup
- beets version: 2.5.1