Skip to content

Fix the MusicBrainz search not taking into account the album/recordin… #5821

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

Merged
merged 1 commit into from
Jun 15, 2025

Conversation

nicomem
Copy link
Contributor

@nicomem nicomem commented Jun 13, 2025

…g aliases

Description

When searching on MusicBrainz, beets does not add the alias field that allows for searching on the entity aliases.

As per the MusicBrainz Indexed Search Syntax:

alias | (part of) any alias attached to the release group (diacritics are ignored)
[...]
release | (part of) the title of any of the releases in the release group

By adding the alias field assigned with the entity title, the search returns better results for titles that can be aliased.

The problem can be reproduced with the following album: https://musicbrainz.org/release-group/b5b4eed2-e871-4268-80bb-7625ee0c6cd0:

Tests had to be updated due to the addition of the alias criteria.

To Do

  • Documentation.
  • Changelog.
  • Tests.

@snejus snejus requested a review from Copilot June 15, 2025 20:31
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 addresses the issue where MusicBrainz searches were not considering album/recording aliases by adding an alias field to the search criteria.

  • Updates the album criteria generation in MusicBrainz plugin to include the alias field.
  • Adjusts candidate search criteria to incorporate alias matching.
  • Updates the changelog and tests to reflect the new alias inclusion.

Reviewed Changes

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

File Description
test/plugins/test_musicbrainz.py Adds a test case check to validate the alias field is set.
docs/changelog.rst Updates changelog to document the alias search improvement.
beetsplug/musicbrainz.py Adds alias field into album criteria and candidate search.

Copy link
Member

@snejus snejus left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@snejus snejus enabled auto-merge June 15, 2025 20:33
@snejus snejus merged commit 8fd20b9 into beetbox:master Jun 15, 2025
22 of 23 checks passed
@nicomem nicomem deleted the search-aliases branch June 15, 2025 21:06
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