From 4184f9dd13dec511361d9aa089f36e7e78770b48 Mon Sep 17 00:00:00 2001 From: Ohm Patel Date: Sat, 2 Jan 2016 12:03:07 -0600 Subject: [PATCH] ABrainz: Chords metadata from low_level --- beetsplug/acousticbrainz.py | 20 ++++++++++++++++++++ docs/plugins/acousticbrainz.rst | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/beetsplug/acousticbrainz.py b/beetsplug/acousticbrainz.py index 652f86ce7..3d03feaae 100644 --- a/beetsplug/acousticbrainz.py +++ b/beetsplug/acousticbrainz.py @@ -158,6 +158,26 @@ def fetch_info(log, items): low_data, ["lowlevel", "average_loudness"], ) + item.chords_changes_rate = get_value( + log, + low_data, + ["tonal", "chords_changes_rate"], + ) + item.chords_key = get_value( + log, + low_data, + ["tonal", "chords_key"], + ) + item.chords_number_rate = get_value( + log, + low_data, + ["tonal", "chords_number_rate"], + ) + item.chords_scale = get_value( + log, + low_data, + ["tonal", "chords_scale"], + ) item.key_key = get_value( log, low_data, diff --git a/docs/plugins/acousticbrainz.rst b/docs/plugins/acousticbrainz.rst index ddd29e7d8..24232437a 100644 --- a/docs/plugins/acousticbrainz.rst +++ b/docs/plugins/acousticbrainz.rst @@ -15,6 +15,10 @@ For all tracks with a MusicBrainz recording ID, the plugin currently sets these fields: * ``average_loudness`` +* ``chords_changes_rate`` +* ``chords_key`` +* ``chords_number_rate`` +* ``chords_scale`` * ``danceable`` * ``gender`` * ``genre_rosamerica``