diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index 211f4c42f..7952c5566 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -418,7 +418,7 @@ def album_info(release): info.media = first_medium.get('format') genres = release.get('genre-list') - if genres: + if config['musicbrainz']['genres'] and genres: info.genre = ';'.join(g['name'] for g in genres) info.decode() diff --git a/beets/config_default.yaml b/beets/config_default.yaml index c75778b80..f3e9acad1 100644 --- a/beets/config_default.yaml +++ b/beets/config_default.yaml @@ -105,6 +105,7 @@ musicbrainz: ratelimit_interval: 1.0 searchlimit: 5 extra_tags: [] + genres: no match: strong_rec_thresh: 0.04 diff --git a/docs/changelog.rst b/docs/changelog.rst index a31c6869b..2f12015a8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -159,9 +159,11 @@ New features: * :doc:`/plugins/web`: add DELETE and PATCH methods for modifying items * :doc:`/plugins/lyrics`: Removed LyricWiki source (shut down on 21/09/2020). * Added a ``--plugins`` (or ``-p``) flag to specify a list of plugins at startup. -* Use musicbrainz genre tag api to get genre information. This currently +* Use the musicbrainz genre tag api to get genre information. This currently depends on functionality that is currently unreleased in musicbrainzngs. - See https://github.com/alastair/python-musicbrainzngs/pull/247 and + Once the functionality has been released, you can enable it with the + ``use_mb_genres`` option. See + https://github.com/alastair/python-musicbrainzngs/pull/247 and https://github.com/alastair/python-musicbrainzngs/pull/266 . Thanks to :user:`aereaux`. diff --git a/docs/reference/config.rst b/docs/reference/config.rst index 2f8cee3c9..021c3d2b7 100644 --- a/docs/reference/config.rst +++ b/docs/reference/config.rst @@ -356,6 +356,14 @@ Sets the albumartist for various-artist compilations. Defaults to ``'Various Artists'`` (the MusicBrainz standard). Affects other sources, such as :doc:`/plugins/discogs`, too. +.. _use_mb_genres: + +use_mb_genres +~~~~~~~~~~~~~ + +Use Musicbrainz genre tags to populate the ``genre`` tag. This will make it a +semicolon-separated list of all the genres tagged for the release on +musicbrainz. UI Options ----------