Skip to content

for mbpseudo: custom_tags_only applies the first artist alias to every track's artist_transl #7125

Description

@jonathan-fang

Problem

With mbpseudo and custom_tags_only: yes, and import.languages not set, every track (and the album) gets the same artist_transl / album_artist_transl: the first English alias found among all release-group artists. Each track's own artist credits are ignored.

Release: https://musicbrainz.org/release/44552726-7e41-4cfb-a0b4-ed4ee8ecfb5d (The Sound of Kirby Café -Jazz Style-, KBCI-00032), which has the English pseudo-release https://musicbrainz.org/release/a414a933-4e43-41a9-8974-ebc7b8b003de. The release group has five artists, and each track credits a different subset of them.

Running this command in verbose (-vv) mode:

$ beet -vv import -L mb_albumid:44552726-7e41-4cfb-a0b4-ed4ee8ecfb5d

Led to this problem:

Loading plugins: chroma, embedart, fetchart, mbpseudo
mbpseudo: Desired scripts: ['Latn']
mbpseudo: Custom tags for albums and tracks: dict_keys(['album_transl', 'album_artist_transl']) + dict_keys(['title_transl', 'artist_transl'])
mbpseudo: Requesting MusicBrainz release 44552726-7e41-4cfb-a0b4-ed4ee8ecfb5d
mbpseudo: Adding pseudo-release a414a933-4e43-41a9-8974-ebc7b8b003de for main release 44552726-7e41-4cfb-a0b4-ed4ee8ecfb5d
mbpseudo: Using locale 'en' to search aliases [{'name': 'Yuuta Ogasawara', 'locale': 'en', 'primary': True, 'type': 'Artist name'}, {'name': 'Hirokazu Ando', 'locale': 'en', 'primary': True, 'type': 'Artist name'}, {'name': 'Hirozaku Ando', 'locale': 'None', 'primary': None, 'type': 'Search hint'}, {'name': '安藤 浩和', 'locale': 'None', 'primary': None, 'type': 'Search hint'}, {'name': '安藤浩和', 'locale': 'ja', 'primary': True, 'type': 'Artist name'}, {'name': 'Jun Ishikawa', 'locale': 'en', 'primary': True, 'type': 'Artist name'}, {'name': '石川 淳', 'locale': 'None', 'primary': None, 'type': 'Search hint'}, {'name': '石川淳', 'locale': 'ja', 'primary': True, 'type': 'Artist name'}, {'name': 'Shogo Sakai', 'locale': 'en', 'primary': True, 'type': 'Artist name'}, {'name': '酒井省吾', 'locale': 'ja', 'primary': True, 'type': 'Artist name'}, {'name': 'Tadashi Ikegami', 'locale': 'en', 'primary': True, 'type': 'Artist name'}, {'name': '池上正', 'locale': 'ja', 'primary': True, 'type': 'Artist name'}]
mbpseudo: Got alias 'Yuuta Ogasawara'

Result after applying the official release:

$ beet ls -f '$track | $artist | $artist_transl' album:"Jazz Style"
01 | 小笠原雄太 & 安藤浩和 | Yuuta Ogasawara
03 | 安藤浩和 | Yuuta Ogasawara
05 | 石川淳 | Yuuta Ogasawara
16 | 小笠原雄太, 池上正 & 加藤有紀 | Yuuta Ogasawara
$ beet ls -a -f '$albumartist | $album_artist_transl' album:"Jazz Style"
小笠原雄太, 安藤浩和, 石川淳, 酒井省吾 & 池上正 | Yuuta Ogasawara

Expected: track 3 → Hirokazu Ando, track 5 → Jun Ishikawa, and so on. album_artist_transl should hold all five names in English.

Likely cause: _replace_artist_with_alias in beetsplug/mbpseudo.py flattens the aliases of all release-group artist credits, calls _preferred_alias once, and assigns that single name to pseudo_release.artist and to every track.artist.

Workaround: leave artist_transl / album_artist_transl out of track_custom_tags / album_custom_tags. (artist_sort already holds correct romanized names for each track.)

Here's a link to the music files that trigger the bug (if relevant): not needed. Any files matching the release above reproduce it.

Setup

  • beets version: 2.14.1
  • Turning off plugins made problem go away (yes/no): yes. The bug is in mbpseudo itself; with plain musicbrainz there is no artist_transl

My configuration (output of beet config) is:

directory: /mnt/c/Users/<user>/Music/beets-library

import:
    copy: yes
    write: yes
    log: ~/.config/beets/import.log

plugins: mbpseudo chroma fetchart embedart
mbpseudo:
    scripts: [Latn]
    custom_tags_only: yes
    search_limit: 5
    data_source_mismatch_penalty: 0.5
    search_query_ascii: no
    genres: no
    genres_tag: genre
    external_ids:
        discogs: no
        bandcamp: no
        spotify: no
        deezer: no
        tidal: no
    extra_tags: []
    aliases_as_credits: no
    album_custom_tags:
        album_transl: album
        album_artist_transl: artist
    track_custom_tags:
        title_transl: title
        artist_transl: artist
paths:
    format:FLAC: flac/$albumartist/$album%aunique{}/$track $title
    format:MP3: mp3/$albumartist/$album%aunique{}/$track $title
    default: other/$albumartist/$album%aunique{}/$track $title
chroma:
    search_limit: 5
    data_source_mismatch_penalty: 0.5
    auto: yes

The relevant part of the configuration when the bug occurred was:

plugins: mbpseudo chroma fetchart embedart
mbpseudo:
  scripts:
    - Latn
  custom_tags_only: yes
# import.languages not set

Activity

  1. Evreu1pro commented on Oct 29, 2026

    @Evreu1pro

    Reproduced this on master (ab4bdfd) against the live MB data for that release. With the default mappings I get album_artist_transl and every track's artist_transl = Yuuta Ogasawara, same as you.

    Something that might make the fix (and a better workaround) simpler: the parsed pseudo-release already has the right per-track names, just in a different field. Because import.languages is empty, _parse_artist_credits falls back to the canonical artist name for artist (so it's still 安藤浩和), but artist_credit is the name credited on the pseudo-release itself:

    track pseudo artist pseudo artist_credit
    3 安藤浩和 Hirokazu Ando
    5 石川淳 Jun Ishikawa
    16 小笠原雄太, 池上正 & 加藤有紀 Yuuta Ogasawara, Tadashi Ikegami & Yuki Kato

    So instead of dropping the tags, this config keeps them and gives the expected values (checked with the same release, all five names in album_artist_transl, joinphrases intact):

    mbpseudo:
        album_custom_tags:
            album_transl: album
            album_artist_transl: artist_credit
        track_custom_tags:
            title_transl: title
            artist_transl: artist_credit

    (Both dicts have to be given in full, per the docs.) Caveat: that's the credited name, not the alias, so on a pseudo-release where someone left the original-script credit it won't be romanized.

    For the real fix, if I'm reading it right, _replace_artist_with_alias only needs to stop flattening: resolve the alias per credit with _preferred_alias(credit["artist"]["aliases"], [locale]) for the release credit and each track's own artist_credit, then join with the joinphrases. That's basically _parse_artist_credits with the locale passed in. Setting import.languages: [en] on the same release gives exactly that result per track, which is a nice way to sanity-check a patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mbpseudo

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions