diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index d64af86965..b7b1b7dbd2 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -572,6 +572,8 @@ def scrape_lyrics_from_html(html): instead. """ def is_text_notcode(text): + if not text: + return False length = len(text) return (length > 20 and text.count(' ') > length / 25 and diff --git a/docs/changelog.rst b/docs/changelog.rst index 3ebe367255..ee8f4c2f61 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -209,6 +209,8 @@ Bug fixes: :bug:`4726` * :doc:`/plugins/fetchart`: Correctly select the cover art from fanart.tv with the highest number of likes +* :doc:`/plugins/lyrics`: Fix a crash with the Google backend when processing + some web pages. :bug:`4875` For packagers: