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.
This commit is contained in:
Ashhar Hasan 2020-04-19 00:50:14 +05:30
parent c93ea0b36b
commit a5ef8c7b09
No known key found for this signature in database
GPG key ID: 4CD0188E0E5784EF

View file

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