From 3a3dc8b3ae90189e87fa56566b9a545f3c6340a7 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 31 Dec 2015 11:35:14 -0800 Subject: [PATCH] acousticbrainz: Don't write tags Since we aren't updating any on-disk tags anyway. --- beetsplug/acousticbrainz.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/beetsplug/acousticbrainz.py b/beetsplug/acousticbrainz.py index badb5728d..e4557106b 100644 --- a/beetsplug/acousticbrainz.py +++ b/beetsplug/acousticbrainz.py @@ -36,13 +36,13 @@ class AcousticPlugin(plugins.BeetsPlugin): def func(lib, opts, args): items = lib.items(ui.decargs(args)) - fetch_info(self._log, items, ui.should_write()) + fetch_info(self._log, items) cmd.func = func return [cmd] -def fetch_info(log, items, write): +def fetch_info(log, items): """Currently outputs MBID and corresponding request status code """ for item in items: @@ -64,6 +64,7 @@ def fetch_info(log, items, write): except ValueError: log.debug('Invalid Response: {}', rs.text) + # Get each field and assign it on the item. item.danceable = get_value( log, data, @@ -80,8 +81,8 @@ def fetch_info(log, items, write): ["highlevel", "mood_party", "all", "party"], ) - if write: - item.try_write() + # Store the data. We only update flexible attributes, so we + # don't call `item.try_write()` here. item.store()