Merge pull request #4876 from beetbox/fix4875

lyrics: Bypass None values in Google backend
This commit is contained in:
Adrian Sampson 2023-08-14 19:00:21 -04:00 committed by GitHub
commit 684fab47bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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: