diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 7cc22b690..9b793defe 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -299,9 +299,10 @@ class LastGenrePlugin(plugins.BeetsPlugin): return result, 'artist' # Filter the existing genre. - result = _strings_to_genre([obj.genre]) - if result: - return result, 'original' + if obj.genre: + result = _strings_to_genre([obj.genre]) + if result: + return result, 'original' # Fallback string. fallback = self.config['fallback'].get() diff --git a/docs/changelog.rst b/docs/changelog.rst index 6a6a3a6f9..c18db177b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -19,6 +19,7 @@ Changelog * :doc:`/plugins/web`: The underlying API was expanded slightly to support `Tomahawk`_ collections. And file transfers now have a "Content-Length" header. Thanks to Uwe L. Korn. +* :doc:`/plugins/lastgenre`: Fix an error when using genre canonicalization. .. _Tomahawk: http://www.tomahawk-player.org/