From 315522aafa361a32fc62d73d9c3c1d74484a2ad8 Mon Sep 17 00:00:00 2001 From: Peter Schnebel Date: Sat, 26 Oct 2013 17:32:30 +0200 Subject: [PATCH] fix inverted conditional when fingerprinting (@pedros) --- beetsplug/echonest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/echonest.py b/beetsplug/echonest.py index f76a3406d..5407fba2d 100644 --- a/beetsplug/echonest.py +++ b/beetsplug/echonest.py @@ -102,9 +102,9 @@ class EchonestMetadataPlugin(plugins.BeetsPlugin): """Get the fingerprint for this item from the EchoNest. If we already have a fingerprint, return it and don't calculate it again. """ - if item.get('echonest_fingerprint', None) is not None: + if item.get('echonest_fingerprint', None) is None: try: - code = self._echofun(pyechonest.util.codegen, filename=item.path) + code = self._echofun(pyechonest.util.codegen, filename=item.path.decode('utf-8')) item['echonest_fingerprint'] = code[0]['code'] item.write() except Exception as exc: