mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
Made various artist title configurable
This commit is contained in:
parent
34e6e39fe5
commit
485870f288
3 changed files with 6 additions and 3 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ verbose: 0
|
|||
terminal_encoding:
|
||||
original_date: no
|
||||
id3v23: no
|
||||
va_name: "Various Artists"
|
||||
|
||||
ui:
|
||||
terminal_width: 80
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue