Skip to content

Commit

Permalink
Add artist_sort as the last entry in the artists to search
Browse files Browse the repository at this point in the history
This will handle cases where the artist name includes some
characters which can cause a search failure for some
websites - mainly unicode.

Fixes #3340.
  • Loading branch information
hashhar committed Apr 18, 2020
1 parent c93ea0b commit a5ef8c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beetsplug/lyrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,13 @@ def generate_alternatives(string, patterns):
alternatives.append(match.group(1))
return alternatives

title, artist = item.title, item.artist
title, artist, artist_sort = item.title, item.artist, item.artist_sort

patterns = [
# Remove any featuring artists from the artists name
r"(.*?) {0}".format(plugins.feat_tokens())]
artists = generate_alternatives(artist, patterns)
artists.append(artist_sort)

patterns = [
# Remove a parenthesized suffix from a title string. Common
Expand Down

0 comments on commit a5ef8c7

Please sign in to comment.