Skip to content

Commit

Permalink
lyrics: Bypass None values in Google backend
Browse files Browse the repository at this point in the history
Fixes #4875.
  • Loading branch information
sampsyo committed Aug 13, 2023
1 parent f75dc3d commit 49846e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions beetsplug/lyrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 49846e7

Please sign in to comment.