Skip to content

Commit be722b5

Browse files
Carson JonesCarson Jones
authored andcommitted
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
1 parent f203bc5 commit be722b5

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

beetsplug/beatport.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import beets
3333
import beets.ui
34+
from beets import config
3435
from beets.autotag.hooks import AlbumInfo, TrackInfo
3536
from beets.metadata_plugins import MetadataSourcePlugin
3637
from beets.util import unique_list
@@ -459,7 +460,7 @@ def _get_album_info(self, release: BeatportRelease) -> AlbumInfo:
459460
va = release.artists is not None and len(release.artists) > 3
460461
artist, artist_id = self._get_artist(release.artists)
461462
if va:
462-
artist = "Various Artists"
463+
artist = config["va_name"].as_str()
463464
tracks: list[TrackInfo] = []
464465
if release.tracks is not None:
465466
tracks = [self._get_track_info(x) for x in release.tracks]

beetsplug/musicbrainz.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,13 @@ def album_info(self, release: JSONDict) -> beets.autotag.hooks.AlbumInfo:
572572
)
573573
info.va = info.artist_id == VARIOUS_ARTISTS_ID
574574
if info.va:
575-
info.artist = config["va_name"].as_str()
575+
va_name = config["va_name"].as_str()
576+
info.artist = va_name
577+
info.artist_sort = va_name
578+
info.artists = [va_name]
579+
info.artists_sort = [va_name]
580+
info.artist_credit = va_name
581+
info.artists_credit = [va_name]
576582
info.asin = release.get("asin")
577583
info.releasegroup_id = release["release-group"]["id"]
578584
info.albumstatus = release.get("status")

docs/changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ Bug fixes
2828
different providers share the same ID. :bug:`6178` :bug:`6181`
2929
- :doc:`plugins/mbsync` and :doc:`plugins/missing` now use each item's stored
3030
``data_source`` for ID lookups, with a fallback to ``MusicBrainz``.
31+
- :doc:`plugins/musicbrainz`: Use ``va_name`` config for ``albumartist_sort``,
32+
``albumartists_sort``, ``albumartist_credit``, ``albumartists_credit``, and
33+
``albumartists`` on VA releases instead of hardcoded "Various Artists".
34+
:bug:`6316`
35+
- :doc:`plugins/beatport`: Use ``va_name`` config for the album artist on VA
36+
releases instead of hardcoded "Various Artists". :bug:`6316`
3137

3238
For plugin developers
3339
~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)