diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index 8589a62aa..78c5fb2f4 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -259,6 +259,8 @@ def album_info(release): data_url=album_url(release['id']), ) info.va = info.artist_id == VARIOUS_ARTISTS_ID + if info.va: + info.artist = config['va_name'].get(unicode) info.asin = release.get('asin') info.releasegroup_id = release['release-group']['id'] info.country = release.get('country') diff --git a/beets/config_default.yaml b/beets/config_default.yaml index f708702a8..ba58debe7 100644 --- a/beets/config_default.yaml +++ b/beets/config_default.yaml @@ -47,6 +47,7 @@ verbose: 0 terminal_encoding: original_date: no id3v23: no +va_name: "Various Artists" ui: terminal_width: 80 diff --git a/beets/importer.py b/beets/importer.py index 85d6e0824..5bdcaff8f 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -48,7 +48,6 @@ action = Enum('action', QUEUE_SIZE = 128 SINGLE_ARTIST_THRESH = 0.25 -VARIOUS_ARTISTS = u'Various Artists' PROGRESS_KEY = 'tagprogress' HISTORY_KEY = 'taghistory' @@ -631,7 +630,7 @@ class ImportTask(BaseImportTask): changes['comp'] = False else: # VA. - changes['albumartist'] = VARIOUS_ARTISTS + changes['albumartist'] = config['va_name'].get(unicode) changes['comp'] = True elif self.choice_flag == action.APPLY: diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index c19e65a2f..2a90cdafe 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -20,6 +20,7 @@ from __future__ import (division, absolute_import, print_function, import beets.ui from beets import logging +from beets import config from beets.autotag.hooks import AlbumInfo, TrackInfo, Distance from beets.plugins import BeetsPlugin from beets.util import confit @@ -55,8 +56,7 @@ class DiscogsPlugin(BeetsPlugin): 'apikey': 'rAzVUQYRaoFjeBjyWuWZ', 'apisecret': 'plxtUTqoCzwxZpqdPysCwGuBSmZNdZVy', 'tokenfile': 'discogs_token.json', - 'source_weight': 0.5, - 'va_name': 'Various Artists', + 'source_weight': 0.5 }) self.config['apikey'].redact = True self.config['apisecret'].redact = True @@ -225,7 +225,7 @@ class DiscogsPlugin(BeetsPlugin): result.data['formats'][0].get('descriptions', [])) or None va = result.data['artists'][0]['name'].lower() == 'various' if va: - artist = self.config['va_name'].get() + artist = config['va_name'].get(unicode) year = result.data['year'] label = result.data['labels'][0]['name'] mediums = len(set(t.medium for t in tracks)) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 85bd87f9b..f276fe4f1 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -30,6 +30,7 @@ import traceback from beets import plugins from beets import ui +from beets import config from beets.util import normpath, plurality from beets import library @@ -291,7 +292,7 @@ class LastGenrePlugin(plugins.BeetsPlugin): result = None if isinstance(obj, library.Item): result = self.fetch_artist_genre(obj) - elif obj.albumartist != 'Various Artists': + elif obj.albumartist != config['va_name'].get(unicode): result = self.fetch_album_artist_genre(obj) else: # For "Various Artists", pick the most popular track genre. diff --git a/docs/changelog.rst b/docs/changelog.rst index 1c1fb0db6..67be6cb0f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -48,9 +48,10 @@ Fixes: * :doc:`/plugins/metasync`: Fix a crash when syncing with recent versions of iTunes. :bug:`1700` * :doc:`/plugins/duplicates`: Fix a crash when merging items. :bug:`1699` -* :doc:`/plugins/discogs`: A new option, ``va_name``, controls the album - artist name for various-artists albums. The default is now "Various - Artists," to match MusicBrainz. +* A new global option, ``va_name``, controls the album artist name for + various-artists albums. Defaults to "Various Artists" (MusicBrainz standard). + In order to match MusicBrainz, :doc:`/plugins/discogs` adapts to this, too. + 1.3.15 (October 17, 2015) diff --git a/docs/plugins/discogs.rst b/docs/plugins/discogs.rst index a7983e7e0..038718f9b 100644 --- a/docs/plugins/discogs.rst +++ b/docs/plugins/discogs.rst @@ -25,16 +25,6 @@ MusicBrainz. If you have a Discogs ID for an album you want to tag, you can also enter it at the "enter Id" prompt in the importer. -Configuration -------------- - -To configure the plugin, make a ``discogs:`` section in your configuration -file. The available options are: - -- **va_name**: The albumartist name to use when an album is marked as being by - "various" artists. - Default: "Various Artists" (matching the MusicBrainz convention). - Troubleshooting --------------- diff --git a/docs/reference/config.rst b/docs/reference/config.rst index 7970d746c..1d8edf595 100644 --- a/docs/reference/config.rst +++ b/docs/reference/config.rst @@ -304,6 +304,15 @@ By default, beets writes MP3 tags using the ID3v2.4 standard, the latest version of ID3. Enable this option to instead use the older ID3v2.3 standard, which is preferred by certain older software such as Windows Media Player. +.. _va_name: + +va_name +~~~~~~~ + +Sets the albumartist for various-artist compilations. Defaults to ``'Various +Artists'`` (MusicBrainz standard). Affects other sources, such as +:doc:`/plugins/discogs`, too. + UI Options ----------