mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
style following review
This commit is contained in:
parent
93ebb9816d
commit
00b08d52d5
2 changed files with 12 additions and 11 deletions
|
|
@ -260,11 +260,10 @@ def track_info(recording, index=None, medium=None, medium_index=None,
|
|||
if arranger:
|
||||
info.arranger = u', '.join(arranger)
|
||||
|
||||
# supplementary tags provided by plugins
|
||||
extra_trackdatas = plugins.send('extracting_trackdata', info=recording)
|
||||
# supplementary fields provided by plugins
|
||||
extra_trackdatas = plugins.send('mb_track_extract', data=recording)
|
||||
for extra_trackdata in extra_trackdatas:
|
||||
for key in extra_trackdata:
|
||||
info[key] = extra_trackdata[key]
|
||||
info.update(extra_trackdata)
|
||||
|
||||
info.decode()
|
||||
return info
|
||||
|
|
@ -454,11 +453,9 @@ def album_info(release):
|
|||
if config['musicbrainz']['genres'] and genres:
|
||||
info.genre = ';'.join(g['name'] for g in genres)
|
||||
|
||||
# supplementary tags provided by plugins
|
||||
extra_albumdatas = plugins.send('extracting_albumdata', info=release)
|
||||
extra_albumdatas = plugins.send('mb_album_extract', data=release)
|
||||
for extra_albumdata in extra_albumdatas:
|
||||
for key in extra_albumdata:
|
||||
info[key] = extra_albumdata[key]
|
||||
info.update(extra_albumdata)
|
||||
|
||||
info.decode()
|
||||
return info
|
||||
|
|
|
|||
|
|
@ -239,10 +239,14 @@ The events currently available are:
|
|||
:ref:`appending choices to the prompt <append_prompt_choices>` by returning a
|
||||
list of ``PromptChoices``. Parameters: ``task`` and ``session``.
|
||||
|
||||
* `extracting_trackdata` and `extracting_albumdata`: called after the metadata
|
||||
is obtained from MusicBrainz. The parameter is a ``dict`` containing the data
|
||||
retrieved from MusicBrainz for a track or an album.
|
||||
* `mb_track_extract`: called after the metadata is obtained from
|
||||
MusicBrainz. The parameter is a ``dict`` containing the data
|
||||
retrieved from MusicBrainz for a track.
|
||||
Allows to add additional tags.
|
||||
Parameter: ``data``
|
||||
|
||||
* `mb_album_extract`: Like `mb_track_extract`, but for album tags.
|
||||
Parameter: ``data``
|
||||
|
||||
The included ``mpdupdate`` plugin provides an example use case for event listeners.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue