Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of mis-matching musicbrianz album artist id and hints tags #9625

Merged
merged 1 commit into from Apr 19, 2016

Conversation

DaveTBlake
Copy link
Member

A follow on from #8904 with more improved handling of mis-matching numbers of Musicbrainz (Album) Artist Ids and (Album) Artist tags when creating songs and albums.

Primarily this was to fix an issue where missing hints (ALBUMARTISTS tag) was causing the album artist tag to be ignored (even when matched mbid) and artist hints and names to be used instead to get album artist names to match the number of mbid. If there was a mis-match of artist names and mbid then the results were quite confusing.
For example:
ARTIST = "artist1 feat. artist2"
MUSICBRAINZ ARTISTID = mbid1
MUSICBRAINZ ARTISTID = mbid2
ALBUMARTIST = "artist1"
MUSICBRAINZ ALBUMARTISTID = mbid1

resulted in an artist named "artist1 feat. artist2" with mbid1 for the album even though the number of album artist names and mbids matched, and the lack of ARTISTS tag and mis-match of mbid <-> name count would have been repaired for the song.

Also a user managed to have ARTISTS and ALBUMARTISTS tags present but as single string with an unexpected separator. If one user can do it so can others, so a more flexible approach to parsing both (ALBUM)ARTIST and (ALBUM)ARTISTS tags when the number of names does not match the number of Musicbrainz ids seems worthwhile.

Hence when an inconsistency in the number of artist names to mbid occurrs this applies improved parsing to both hints and names, using multiple item separators progressively, in an attempt to correctly interpret the way music files have been tagged.

@razzeee got some time to look at this? The sooner it is out there getting more real user data through it the better

@DaveTBlake DaveTBlake added Type: Fix non-breaking change which fixes an issue v17 Krypton Component: Music labels Apr 14, 2016

// Vector of possible separators in the order least likely to be part of artist name
const char *sepinit[] = { " feat. ", ";", ":", "|", "#", "/", ",", "&" };
std::vector<std::string> separators(sepinit, std::end(sepinit));

This comment was marked as spam.

@DaveTBlake
Copy link
Member Author

Thanks @phate89 for the code suggestions. My dev env is in pieces at the moment, attempting to back out of VS2015 (seems incompatible with my old PC) which has brought me to a halt.

return results;

for (const auto& item : input)
results.push_back(item);

This comment was marked as spam.

…t Ids and (Album) Artist tags when creating songs and albums.

Fix missing hints (ALBUMARTISTS tag) causing artist hints to be used to get album artist to match mbid rather than try album artist itself. Made mess when artist hints are broken and repair happening.
@DaveTBlake
Copy link
Member Author

Thanks for the improvements @phate89

jenkins build this please

@DaveTBlake
Copy link
Member Author

Compile error not related to this PR

@DaveTBlake DaveTBlake merged commit e31538d into xbmc:master Apr 19, 2016
@DaveTBlake DaveTBlake added this to the Krypton 17.0-alpha1 milestone Apr 19, 2016
@DaveTBlake DaveTBlake deleted the FixArtistTagRobust branch April 27, 2016 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Music Type: Fix non-breaking change which fixes an issue v17 Krypton
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants