diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 2f065a63e..33fad7628 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -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', diff --git a/docs/changelog.rst b/docs/changelog.rst index 79fda8c50..d3e80fb4e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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: diff --git a/docs/plugins/lastgenre.rst b/docs/plugins/lastgenre.rst index 043f6e163..37497fa40 100644 --- a/docs/plugins/lastgenre.rst +++ b/docs/plugins/lastgenre.rst @@ -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 ----------------