From c5f25429e962f67c2150fa5483147ac472002cf7 Mon Sep 17 00:00:00 2001 From: Ohm Patel Date: Fri, 1 Jan 2016 18:29:36 -0600 Subject: [PATCH] ABrainz: Fixed docstrings and documentation --- beetsplug/acousticbrainz.py | 10 +++++----- docs/plugins/acousticbrainz.rst | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/beetsplug/acousticbrainz.py b/beetsplug/acousticbrainz.py index 8ec719383..f398fe8f2 100644 --- a/beetsplug/acousticbrainz.py +++ b/beetsplug/acousticbrainz.py @@ -13,7 +13,7 @@ # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. -""" Fetch various AcousticBrainz metadata using MBID +"""Fetch various AcousticBrainz metadata using MBID. """ from __future__ import (division, absolute_import, print_function, unicode_literals) @@ -47,7 +47,7 @@ class AcousticPlugin(plugins.BeetsPlugin): return [cmd] def import_task_files(self, session, task): - """Automatically tag imported files + """Function is called upon beet import. """ items = task.imported_items() @@ -55,7 +55,7 @@ class AcousticPlugin(plugins.BeetsPlugin): def fetch_info(log, items): - """Currently outputs MBID and corresponding request status code + """Currently outputs MBID and corresponding request status code. """ for item in items: if item.mb_trackid: @@ -154,13 +154,13 @@ def fetch_info(log, items): def generate_url(mbid): - """Generates url of AcousticBrainz end point for given MBID + """Generates AcousticBrainz end point url for given MBID. """ return ACOUSTIC_URL + mbid + LEVEL def get_value(log, data, map_path): - """Allows traversal of dictionary with cleaner formatting + """Allows easier traversal of dictionary. """ try: return reduce(lambda d, k: d[k], map_path, data) diff --git a/docs/plugins/acousticbrainz.rst b/docs/plugins/acousticbrainz.rst index b5f07d884..24938473f 100644 --- a/docs/plugins/acousticbrainz.rst +++ b/docs/plugins/acousticbrainz.rst @@ -33,8 +33,7 @@ Automatic Tagging To automatically tag files using AcousticBrainz data during import, just enable the ``acousticbrainz`` plugin (see :ref:`using-plugins`). When importing -new files (with ``import.write`` turned on) or modifying files' tags with the -``beet modify`` command, beets will query the AcousticBrainz API using MBID and +new files, beets will query the AcousticBrainz API using MBID and set the appropriate metadata. Configuration @@ -43,5 +42,5 @@ Configuration To configure the plugin, make a ``acousticbrainz:`` section in your configuration file. There is one option: -- **auto**: Enable AcousticBrainz import during import. +- **auto**: Enable AcousticBrainz during ``beet import``. Default: ``yes``.