Skip to content

Commit

Permalink
Minor cleanup and changelog for #922
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Aug 27, 2014
1 parent e36dfa3 commit 4b11eed
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
9 changes: 3 additions & 6 deletions beetsplug/mbcollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,14 @@ def __init__(self):
config['musicbrainz']['pass'].get(unicode),
)
self.config.add({'auto': False})
self.automatic = self.config['auto'].get(bool)
self.import_stages = [self.imported]
if self.config['auto']:
self.import_stages = [self.imported]

def commands(self):
return [update_mb_collection_cmd]

def imported(self, session, task):
"""Add each added album to the musicbrainz collection
"""Add each imported album to the collection.
"""
if not self.automatic:
return

if task.is_album:
update_album_list([task.album])
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Features:
and the ``--library`` option prints library fields instead of tags.
Tags and library fields for multiple files can be summarized with the
``--summarize`` option.
* :doc:`/plugins/mbcollection`: A new option lets you automatically update
your collection on import. Thanks to Olin Gay.

Fixes:

Expand Down
16 changes: 8 additions & 8 deletions docs/plugins/mbcollection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ command automatically adds all of your albums to the first collection it finds.
If you don't have a MusicBrainz collection yet, you may need to add one to your
profile first.

Auto Update Mode
----------------
Automatically Update on Import
------------------------------

You can now add each imported album to your MusicBrainz collection, without
needing a separate ``beet mbupdate`` command. To do this, first enable the
plugin and add your MusicBrainz account using the instructions above. Then,
add a block for the ``mbcollection`` plugin to enable ``auto`` configuration::
You can also configure the plugin to automatically amend your MusicBrainz
collection whenever you import a new album. To do this, first enable the
plugin and add your MusicBrainz account as above. Then, add ``mbcollection``
section and enable the enable ``auto`` flag therein::

mbcollection:
auto: yes

During future imports, your default collection will be updated with the
imported album.
During future imports, your default collection will be updated with each
imported album.

0 comments on commit 4b11eed

Please sign in to comment.