diff --git a/beetsplug/bpm.py b/beetsplug/bpm.py index 89424f30e..20218bd33 100644 --- a/beetsplug/bpm.py +++ b/beetsplug/bpm.py @@ -65,7 +65,9 @@ class BPMPlugin(BeetsPlugin): return [cmd] def command(self, lib, opts, args): - self.get_bpm(lib.items(ui.decargs(args))) + items = lib.items(ui.decargs(args)) + write = ui.should_write() + self.get_bpm(items, write) def get_bpm(self, items, write=False): overwrite = self.config['overwrite'].get(bool) diff --git a/docs/changelog.rst b/docs/changelog.rst index 909315ff3..49a7a6245 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -22,6 +22,8 @@ Features: for files that already have it by default. You can override this behavior using a new ``force`` option. Thanks to :user:`SusannaMaria`. :bug:`2347` :bug:`2349` +* :doc:`/plugins/bpm`: Now uses ``import.write`` option to write tracks after + updating their BPM. Fixes: diff --git a/docs/plugins/bpm.rst b/docs/plugins/bpm.rst index ce1f62298..012c3903c 100644 --- a/docs/plugins/bpm.rst +++ b/docs/plugins/bpm.rst @@ -22,6 +22,21 @@ for instance, with ``mpc`` you can do something like:: beet bpm $(mpc |head -1|tr -d "-") +If :ref:`import.write ` is ``yes``, the song's tags are +written to disk. + +Configuration +------------- + +To configure the plugin, make a ``bpm:`` section in your configuration file. +The available options are: + +- **max_strokes**: The maximum number of strokes to accept when tapping out the + BPM. + Default: 3. +- **overwrite**: Overwrite the track's existing BPM. + Default: ``yes``. + Credit ------ diff --git a/docs/reference/config.rst b/docs/reference/config.rst index ffedb14d4..8f009fc3f 100644 --- a/docs/reference/config.rst +++ b/docs/reference/config.rst @@ -387,6 +387,8 @@ file that looks like this:: These options are available in this section: +.. _config-import-write: + write ~~~~~