Skip to content

Commit

Permalink
Add documentation for the force-option
Browse files Browse the repository at this point in the history
  • Loading branch information
Susanna Maria Hepp committed Dec 27, 2016
1 parent c474142 commit b8fa8dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beetsplug/absubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def commands(self):
cmd.parser.add_option(
u'-f', u'--force', dest='force_refetch',
action='store_true', default=False,
help=u'always analyse acousticbrainz data',
help=u're-analyse data when already present'
)

cmd.func = self.command
Expand All @@ -107,8 +107,8 @@ def _get_analysis(self, item,force):

if not force:
mood_str = item.get('mood_acoustic', u'')
if len(mood_str) != 0:
self._log.info(u'Already set acousticbrainz tag for {} ', item)
if mood_str:
self._log.info(u'Already acousticbrainz tags available for {} ', item)
return None

mbid = item['mb_trackid']
Expand Down
10 changes: 10 additions & 0 deletions docs/plugins/absubmit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ AcousticBrainz Submit Plugin

The `absubmit` plugin uses the `streaming_extractor_music`_ program to analyse an audio file and calculate different acoustic properties of the audio, the plugin then uploads this metadata to the AcousticBrainz server. The plugin does this when calling the ``beet absumbit [QUERY]`` command or on importing if the `auto` configuration options is set to ``yes``.

$ beet absubmit [-f] [QUERY]

By default, the command will only analyse for acousticbrainz data when the tracks doesn't
already have it; the ``-f`` or ``--force`` switch makes it analyse the tracks for acousticbrainz.
If you specify a query, only matching tracks will be processed;
otherwise, the command processes every track in your library.

Installation
------------

Expand All @@ -23,6 +30,9 @@ To configute the plugin, make a ``absubmit:`` section in your configuration file
Default: ``no``
- **extractor**: The path to the `streaming_extractor_music`_ binary.
Default: search for the program in your ``$PATH``
- **force**: By default, beets will not analyse Tracks if it have already acousticbrainz data. To instead analyse tracks and send json to acousticbrainz,
set the ``force`` option to ``yes``.
Default: ``no``.

.. _streaming_extractor_music: http://acousticbrainz.org/download
.. _FAQ: http://acousticbrainz.org/faq
Expand Down

0 comments on commit b8fa8dc

Please sign in to comment.