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
This commit is contained in:
Carson Jones 2026-03-12 23:00:32 -04:00
parent f203bc5241
commit be722b564e
3 changed files with 15 additions and 2 deletions

View file

@ -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]

View file

@ -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")

View file

@ -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
~~~~~~~~~~~~~~~~~~~~~