Skip to content

Import MusicBrainz composer/lyricist/arranger ids #5847

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Maxr1998
Copy link
Contributor

@Maxr1998 Maxr1998 commented Jun 29, 2025

Description

Updates the MusicBrainz plugin to also import MBIDs for composers/lyricists/arrangers, and adds them as multi-valued fields.

See #5698.

To Do

  • Documentation. (not required for this change)
  • Changelog
  • Tests (?): it looks like there generally aren't any tests yet for writer relationships, so it is unclear whether tests for this change are necessary. However, this change was already tested locally and worked fine with my collection.

Updates the MusicBrainz plugin to also import MBIDs for composers/lyricists/arrangers, and also adds them as multi-valued fields.
@Copilot Copilot AI review requested due to automatic review settings June 29, 2025 12:30
Copy link

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the MusicBrainz plugin by importing MBIDs for composers, lyricists, and arrangers and storing them as multi-valued fields. The changes span updates to the track information processing logic, the library schema, and the autotag hooks to accommodate the new fields.

  • Updated track_info in the MusicBrainz plugin to collect both names and MBIDs for lyricists, composers, and arrangers.
  • Modified the library model to add new multi-valued fields for the additional MBIDs.
  • Adjusted autotag hooks and initialization to integrate the new fields into the metadata processing.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
beetsplug/musicbrainz.py Updated to extract and store MBIDs alongside names for lyricists, composers, and arrangers
beets/library.py Added new schema entries for multi-valued MBID fields
beets/autotag/hooks.py Updated constructor parameters and initialization for new lyricist, composer, and arranger fields
beets/autotag/init.py Mapped new track information fields to corresponding item fields
Comments suppressed due to low confidence (2)

beetsplug/musicbrainz.py:485

  • [nitpick] Consider adding inline comments to explain the rationale for storing both the concatenated string (for legacy support) and the list of lyricists (for enhanced functionality).
        if lyricists:

beets/library.py:544

  • Ensure that tests are added to verify the correct import and synchronization of the new multi-valued fields for lyricists, composers, and arrangers.
        "lyricists": types.MULTI_VALUE_DSV,

@semohr
Copy link
Contributor

semohr commented Jul 1, 2025

Heya, thank you for the PR!

I'm not too sure if we want to mirror more ids from musicbrainz in the autotag functionalities if they are not actively used in the lookup process. Especially since mb was moved into a plugin and other metadata sources do not supply the same information.

Maybe instead of specifically defining all different id properties, we can find a more generic way to allow adding arbitrary IDs (Optimally without the need to manually edit the autotag module)? Seems to me like we might have aquie some duplication for multivalue id fields.

I would be highly interested in @snejus thoughts on this. Let's discuss this a bit before we continue with the merge.

Best, Sebastian

@Maxr1998
Copy link
Contributor Author

Maxr1998 commented Jul 1, 2025

I'm not too sure if we want to mirror more ids from musicbrainz in the autotag functionalities if they are not actively used in the lookup process. Especially since mb was moved into a plugin and other metadata sources do not supply the same information.

Maybe instead of specifically defining all different id properties, we can find a more generic way to allow adding arbitrary IDs (Optimally without the need to manually edit the autotag module)? Seems to me like we might have aquie some duplication for multivalue id fields.

Yes, this is a good point. In my original issue in #5698 I wrote a separate plugin that contained all these properties inside, we can likely do the same for the new musicbrainz plugin. However, the we definitely need #5833 first because otherwise those fields can't store multiple values as a list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants