mirror of
https://github.com/beetbox/beets.git
synced 2025-12-09 18:12:19 +01:00
Merge pull request #3781 from aereaux/add_genres
Add genre support using musicbrainz tags.
This commit is contained in:
commit
072e1dfead
2 changed files with 11 additions and 0 deletions
|
|
@ -74,6 +74,8 @@ RELEASE_INCLUDES = ['artists', 'media', 'recordings', 'release-groups',
|
|||
TRACK_INCLUDES = ['artists', 'aliases']
|
||||
if 'work-level-rels' in musicbrainzngs.VALID_INCLUDES['recording']:
|
||||
TRACK_INCLUDES += ['work-level-rels', 'artist-rels']
|
||||
if 'genres' in musicbrainzngs.VALID_INCLUDES['recording']:
|
||||
RELEASE_INCLUDES += ['genres']
|
||||
|
||||
|
||||
def track_url(trackid):
|
||||
|
|
@ -415,6 +417,10 @@ def album_info(release):
|
|||
first_medium = release['medium-list'][0]
|
||||
info.media = first_medium.get('format')
|
||||
|
||||
genres = release.get('genre-list')
|
||||
if genres:
|
||||
info.genre = ';'.join(g['name'] for g in genres)
|
||||
|
||||
info.decode()
|
||||
return info
|
||||
|
||||
|
|
|
|||
|
|
@ -159,6 +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
|
||||
depends on functionality that is currently unreleased in musicbrainzngs.
|
||||
See https://github.com/alastair/python-musicbrainzngs/pull/247 and
|
||||
https://github.com/alastair/python-musicbrainzngs/pull/266 .
|
||||
Thanks to :user:`aereaux`.
|
||||
|
||||
Fixes:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue