Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lyrics: Bypass None values in Google backend #4876

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading