Skip to content

Add mbpseudo plugin for pseudo-release proposals #5888

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 11 commits into
base: master
Choose a base branch
from

Conversation

asardaes
Copy link

@asardaes asardaes commented Jul 20, 2025

Description

Hi there, I wanted to implement this for my foreign music and I would be glad to get some feedback from the maintainers. I will address all the TODOs, but first I'd like to know if this fits.

The auto-tagger can already resolve official releases from pseudo-releases, but this only happens if the user provides search IDs manually. Similarly, import.languages can be used to search for artist aliases (and that does happen automatically), but that doesn't apply to album and track names.

This plugin proactively searches for pseudo-releases during import and adds them as candidates. Since it also depends on MusicBrainz, there are some special considerations for the default logic (which is now a plugin as well). However, at the very least it expects a list of desired names of scripts in the configuration, for example:

mbpseudo:
    scripts:
    - Latn

It will use that to search for pseudo-releases that match some of the desired scripts, but will only do so if the input tracks match against an official release that is not in one of the desired scripts.

Standalone Usage

This would be the recommended approach, which involves disabling the musicbrainz plugin. The mbpseudo plugin will manually delegate the initial search to it. Since the data source of official releases will still match MusicBrainz, weights are still relevant:

mbpseudo:
    source_weight: 0.0
    scripts:
    - Latn

musicbrainz:
    source_weight: 0.1

A setup like that would ensure that the pseudo-releases have slightly more preference when choosing the final proposal.

Combined Usage

I initially thought it would be important to coexist with the musicbrainz plugin when it's enabled, and reuse as much of its data as possible to avoid redundant calls to the MusicBrainz API. I have the impression this is not really important in the end, and maybe things could be simplified if we decide that both plugins shouldn't coexist.

As it is right now, using both plugins at the same time would still work, but it'll only avoid redundancy if musicbrainz emits its candidates before mbpseudo, which is why I modified the plugin-loading logic slightly to guarantee ordering. I'm not sure if you think this could be an issue, but I think the musicbrainz plugin is also used by other plugins and I can imagine it's good to guarantee the order that is declared in the configuration?

If the above is fulfilled, the mbpseudo plugin will use listeners to intercept data emitted by the musicbrainz plugin and check if any of them have pseudo-releases that might be desirable.

To Do

  • Documentation.
  • Changelog.
  • Tests.

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

codecov bot commented Jul 20, 2025

Codecov Report

❌ Patch coverage is 22.34637% with 139 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.40%. Comparing base (c2d1bc3) to head (41487b3).

Files with missing lines Patch % Lines
beetsplug/mbpseudo.py 21.46% 139 Missing ⚠️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asardaes asardaes force-pushed the feature/mbpseudo-plugin branch 6 times, most recently from 6bae336 to 41487b3 Compare August 9, 2025 13:40
@asardaes asardaes force-pushed the feature/mbpseudo-plugin branch from 41487b3 to fc81dc8 Compare August 10, 2025 17:36
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.

1 participant