beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.83k stars 1.82k forks source link

parentwork: Heuristic or manual selection when there are multiple parents #4001

Open aereaux opened 3 years ago

aereaux commented 3 years ago

I have this album in my collection. On CD 4 the tracks 4.3 to 4.8 get their parentwork as Fantasia, instead of the proper ballet suite. I'm not sure if there's a good way to fix this either in the code or in the data in musicbrainz. One thought I had was to choose the work with the earliest composition date, but that might not always work (especially if the dates are not specified), and might be difficult to implement, including needing to get more data than we already do.

If anyone has any other ideas about how to work around or solve this problem, that would be great.

sampsyo commented 3 years ago

That's odd! @dosoe, would you mind taking a look?

aereaux commented 3 years ago

Thanks for the quick response. It's not so much that it's odd as that it's a problem with the way the Fantasia soundtrack is categorized in MB. I think right now there's not much logic when a work has multiple parents, so it appears to just take the first one: image I'm mostly just not sure how that could be improved.

dosoe commented 3 years ago

Yes, that's exactly what's happening. One thing I would like to do is allow to choose a parentwork when there are several, that's been a problem for me as well. I'm gonna do it at some point, but I'm finishing a PR for performers right now.

aereaux commented 3 years ago

Do you think adding some heuristics would improve this? At least in this case preferring other types of works over soundtracks would help and seems helpful in the general case.

dosoe commented 3 years ago

Actually, on one of my forks I hardcoded a work to be taken as a part of a bach cantata rather than of the neon genesis evangelion soundtrack, but I don't like this solution, because it assumes noone will listen to it as part of the soundtrack. Also, I have a few soundtracks in my collection, and I'm not sure all soundtracks are marked as such on MusicBrainz. I think making a choice when getting the parentwork if there are several is the good solution, but I have to do it, I think I will do it before the end of the year for sure, maybe earlier. I mean, it shouldn't be too hard, just take a plugin that offers you a choice as a template or check the documentation, it's explained there.