From 45c8e51d6cd92574d0dafffe73a98ad21a627aad Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Sun, 19 Apr 2020 19:08:42 +0530 Subject: [PATCH] Fix redundant requests for artist == artist_sort --- beetsplug/lyrics.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 19acbcadc..0aebe9606 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -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