From be722b564e58796893d9185e01896fdad2ed28e7 Mon Sep 17 00:00:00 2001 From: Carson Jones Date: Thu, 12 Mar 2026 23:00:32 -0400 Subject: [PATCH] Use va_name config for all artist fields on VA releases When importing compilations, albumartist_sort, albumartists_sort, albumartist_credit, albumartists_credit, and albumartists were hardcoded to "Various Artists" instead of using the user-configured va_name setting. This also fixes the same issue in the beatport plugin. Fixes #6316 --- beetsplug/beatport.py | 3 ++- beetsplug/musicbrainz.py | 8 +++++++- docs/changelog.rst | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/beetsplug/beatport.py b/beetsplug/beatport.py index 8efaa3b76..a1de3c870 100644 --- a/beetsplug/beatport.py +++ b/beetsplug/beatport.py @@ -31,6 +31,7 @@ from requests_oauthlib.oauth1_session import ( import beets import beets.ui +from beets import config from beets.autotag.hooks import AlbumInfo, TrackInfo from beets.metadata_plugins import MetadataSourcePlugin from beets.util import unique_list @@ -459,7 +460,7 @@ class BeatportPlugin(MetadataSourcePlugin): va = release.artists is not None and len(release.artists) > 3 artist, artist_id = self._get_artist(release.artists) if va: - artist = "Various Artists" + artist = config["va_name"].as_str() tracks: list[TrackInfo] = [] if release.tracks is not None: tracks = [self._get_track_info(x) for x in release.tracks] diff --git a/beetsplug/musicbrainz.py b/beetsplug/musicbrainz.py index c685ee5ab..011a8e300 100644 --- a/beetsplug/musicbrainz.py +++ b/beetsplug/musicbrainz.py @@ -572,7 +572,13 @@ class MusicBrainzPlugin( ) info.va = info.artist_id == VARIOUS_ARTISTS_ID if info.va: - info.artist = config["va_name"].as_str() + va_name = config["va_name"].as_str() + info.artist = va_name + info.artist_sort = va_name + info.artists = [va_name] + info.artists_sort = [va_name] + info.artist_credit = va_name + info.artists_credit = [va_name] info.asin = release.get("asin") info.releasegroup_id = release["release-group"]["id"] info.albumstatus = release.get("status") diff --git a/docs/changelog.rst b/docs/changelog.rst index 875dca79e..6944f1e7b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -28,6 +28,12 @@ Bug fixes different providers share the same ID. :bug:`6178` :bug:`6181` - :doc:`plugins/mbsync` and :doc:`plugins/missing` now use each item's stored ``data_source`` for ID lookups, with a fallback to ``MusicBrainz``. +- :doc:`plugins/musicbrainz`: Use ``va_name`` config for ``albumartist_sort``, + ``albumartists_sort``, ``albumartist_credit``, ``albumartists_credit``, and + ``albumartists`` on VA releases instead of hardcoded "Various Artists". + :bug:`6316` +- :doc:`plugins/beatport`: Use ``va_name`` config for the album artist on VA + releases instead of hardcoded "Various Artists". :bug:`6316` For plugin developers ~~~~~~~~~~~~~~~~~~~~~