Fix redundant requests for artist == artist_sort

This commit is contained in:
Ashhar Hasan 2020-04-19 19:08:42 +05:30
parent a5ef8c7b09
commit 45c8e51d6c
No known key found for this signature in database
GPG key ID: 4CD0188E0E5784EF

View file

@ -206,7 +206,10 @@ def search_pairs(item):
# Remove any featuring artists from the artists name
r"(.*?) {0}".format(plugins.feat_tokens())]
artists = generate_alternatives(artist, patterns)
artists.append(artist_sort)
# Use the artist_sort as fallback only if it differs from artist to avoid
# repeated remote requests with the same search terms
if artist != artist_sort:
artists.append(artist_sort)
patterns = [
# Remove a parenthesized suffix from a title string. Common