mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 03:54:21 +01:00
#397: shorter option name, docs, changlog
I changed the option name from "multiple_genres" to "multiple".
This commit is contained in:
parent
f35d7fec9c
commit
2aebec0928
3 changed files with 18 additions and 3 deletions
|
|
@ -80,14 +80,14 @@ def _is_allowed(genre):
|
|||
|
||||
def _find_allowed(genres):
|
||||
"""Given a list of candidate genres (strings), return an allowed
|
||||
genre string. If `multiple_genres` is on, then this may be a
|
||||
genre string. If `multiple` is on, then this may be a
|
||||
comma-separated list; otherwise, it is one of the elements of
|
||||
`genres`.
|
||||
"""
|
||||
allowed_genres = [g.title() for g in genres if _is_allowed(g)]
|
||||
if not allowed_genres:
|
||||
return
|
||||
if config['lastgenre']['multiple_genres']:
|
||||
if config['lastgenre']['multiple']:
|
||||
return u', '.join(allowed_genres)
|
||||
else:
|
||||
return allowed_genres[0]
|
||||
|
|
@ -204,7 +204,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
|
||||
self.config.add({
|
||||
'whitelist': os.path.join(os.path.dirname(__file__), 'genres.txt'),
|
||||
'multiple_genres': False,
|
||||
'multiple': False,
|
||||
'fallback': None,
|
||||
'canonical': None,
|
||||
'source': 'album',
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ New stuff:
|
|||
* The MusicBrainz data source now uses track artists over recording
|
||||
artists. This leads to better metadata when tagging classical music. Thanks
|
||||
to Henrique Ferreiro.
|
||||
* :doc:`/plugins/lastgenre`: You can now get multiple genres per album or
|
||||
track using the ``multiple`` config option. Thanks to rashley60 on GitHub.
|
||||
|
||||
And some fixes:
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,19 @@ The default is "album". When set to "track", the plugin will fetch *both*
|
|||
album-level and track-level genres for your music when importing albums.
|
||||
|
||||
|
||||
Multiple Genres
|
||||
---------------
|
||||
|
||||
By default, the plugin chooses the most popular tag on Last.fm as a genre. If
|
||||
you prefer to use a list of *all available* genre tags, turn on the
|
||||
``multiple`` config option::
|
||||
|
||||
lastgenre:
|
||||
multiple: true
|
||||
|
||||
Comma-separated lists of genres will then be used instead of single genres.
|
||||
|
||||
|
||||
Running Manually
|
||||
----------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue