Merge pull request #1708 from m-urban/config_va_name

Made various artist title configurable
This commit is contained in:
Adrian Sampson 2015-11-08 13:00:51 -08:00
commit 5bf344e149
8 changed files with 22 additions and 19 deletions

View file

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

View file

@ -47,6 +47,7 @@ verbose: 0
terminal_encoding:
original_date: no
id3v23: no
va_name: "Various Artists"
ui:
terminal_width: 80

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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