From a5ef8c7b09db2dc95df269de158d8f34f33ad015 Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Sun, 19 Apr 2020 00:50:14 +0530 Subject: [PATCH] Add artist_sort as the last entry in the artists to search This will handle cases where the artist name includes some characters which can cause a search failure for some websites - mainly unicode. Fixes https://github.com/beetbox/beets/issues/3340. --- beetsplug/lyrics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index cca0fa94e..19acbcadc 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -200,12 +200,13 @@ def search_pairs(item): 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