From 5fb4003ebe2585d03f3f9214cc24632be19ffb8f Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 30 Nov 2014 12:21:27 -0800 Subject: [PATCH] echonest: Fix #896 (handle missing duration) --- beetsplug/echonest.py | 2 +- docs/changelog.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/beetsplug/echonest.py b/beetsplug/echonest.py index a16b8cc6a..1eb6dde3c 100644 --- a/beetsplug/echonest.py +++ b/beetsplug/echonest.py @@ -400,7 +400,7 @@ class EchonestMetadataPlugin(plugins.BeetsPlugin): method.__name__, item.artist, item.title, - song['duration'], + song.get('duration'), ) ) return song diff --git a/docs/changelog.rst b/docs/changelog.rst index 17ffaf462..64532a28b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -24,6 +24,8 @@ Fixed: :doc:`/plugins/echonest` instead. * :doc:`/plugins/echonest`: Fingerprint-based lookup has been removed in accordance with `API changes`_. :bug:`1121` +* :doc:`/plugins/echonest`: Avoid a crash when the song has no duration + information. :bug:`896` .. _API changes: http://developer.echonest.com/forums/thread/3650 .. _Plex: https://plex.tv/