bugfix: honor the auto config option

This commit is contained in:
Peter Schnebel 2013-11-01 13:12:27 +01:00
parent 7aff16b169
commit 8068e6b522

View file

@ -64,8 +64,9 @@ class EchonestMetadataPlugin(plugins.BeetsPlugin):
pyechonest.config.CODEGEN_BINARY_OVERRIDE = \
config['echonest']['codegen'].get(unicode)
self.register_listener('import_task_start', self.fetch_song_task)
self.register_listener('import_task_apply', self.apply_metadata_task)
if config['echonest']['auto'].get(bool):
self.register_listener('import_task_start', self.fetch_song_task)
self.register_listener('import_task_apply', self.apply_metadata_task)
def _echofun(self, func, **kwargs):
"""Wrapper for requests to the EchoNest API. Will retry up to RETRIES