artist mismatched if two artists share the same Musicbrainz artist ID but with different names or alias
Steps to reproduce
0.Clear all relative data in funklewhale if any, including tracks and artists
1.Prepare two tracks in the same album(maybe it's not a must to be in the same album), they are filled with musicbrainz tags
2.Both two tracks share the same MUSICBRAINZ_ARTISTID
value in metatdata, but with different ARTIST
value name, both fields is specific for the track itself, not the album, but maybe it also applies for album artists
3.Upload these two tracks via web(maybe console is ok?)
4.These two tracks is displayed with the artis name, not the expected different two artists
What happens?
Without loss of generality we assume track.1
is with the artist name A
, and track.2
is with the artist name B
, and the MBID of artist is the same, we assume the MBID is idZ.
if track.1
is uploaded and processed first, track.2
later, there will be only the artist name A
in the database, and both track.1
and track.2
share the artist A
. And the vice versa.
You will never get the chance to create an artist with other name like B
or C
if an A
is created with the same MBID idZ
.
What is expected?
Two artists is created, A
with MBID idZ
and B
with MBID idz
Context
This may be caused by the function get_artist
and get_best_candidate_or_create
in task.py
, it builds the query with query = Q(mbid=artist_mbid)
if the artist_mbid
field exists, with the assumption that artist_mbid
and artist_name
is an 1-1 relation
I think more restriction should be applied to the sorting procedure, at least if the artis name is not null, it should be take into condieration that it should be an AND
filter in the query. Only when artist_mbid
and artist_name
is the same, or artist_name
is null while artist_mbid
is filled or some other situations, two artist should be consider as one.
This may happen in some JPOP albums. The album is issued by a group, but tracks are performed by subgroup from the album group,
for example, https://musicbrainz.org/release/d151295d-7348-4cb0-8828-8c90372214e3
Track 1,2,3,4 are with the artist MBID e45ab497-e63c-4bf3-8815-1cff2427d818
but with different displayed name in Track Artist
field in recording page on musicbrainz
Funkwhale version(s) affected: x.y 1.1.2+git.ea4be336
There is a similar issue 1030, but what I want to address is not music track with multiple artists, but track with different artists name while sharing the same MBID, it's quite common in JPOP, maybe.