Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pm/acousticbrainz extra fields #3335

Merged
merged 2 commits into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions beetsplug/acousticbrainz.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
'sad': 'mood_sad'
}
},
'moods_mirex': {
'value': 'moods_mirex'
},
'ismir04_rhythm': {
'value': 'rhythm'
},
Expand All @@ -82,6 +85,9 @@
'tonal': 'tonal'
}
},
'timbre': {
'value': 'timbre'
},
'voice_instrumental': {
'value': 'voice_instrumental'
},
Expand Down Expand Up @@ -124,7 +130,9 @@ class AcousticPlugin(plugins.BeetsPlugin):
'mood_party': types.Float(6),
'mood_relaxed': types.Float(6),
'mood_sad': types.Float(6),
'moods_mirex': types.STRING,
'rhythm': types.Float(6),
'timbre': types.STRING,
'tonal': types.Float(6),
'voice_instrumental': types.STRING,
}
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ New features:
new ``discogs_albumid`` field from the Discogs API.
Thanks to :user:`thedevilisinthedetails`.
:bug:`465` :bug:`3322`
* :doc:`/plugins/acousticbrainz`: The plugin now fetches two more additional
fields: ``moods_mirex`` and ``timbre``.
Thanks to :user:`malcops`.
:bug:`2860`

Fixes:

Expand Down
2 changes: 2 additions & 0 deletions docs/plugins/acousticbrainz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ these fields:
* ``mood_party``
* ``mood_relaxed``
* ``mood_sad``
* ``moods_mirex``
* ``rhythm``
* ``timbre``
* ``tonal``
* ``voice_instrumental``

Expand Down
4 changes: 3 additions & 1 deletion test/test_acousticbrainz.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def test_realistic(self):
('danceable', 0.143928021193),
('rhythm', 'VienneseWaltz'),
('mood_electronic', 0.339881360531),
('mood_happy', 0.0894767045975)
('mood_happy', 0.0894767045975),
('moods_mirex', "Cluster3"),
('timbre', "bright")
}
self.assertEqual(mapping, expected)

Expand Down