Verified Commit 5f2b884c authored by Sumner Evans's avatar Sumner Evans 💬

Closes #264: Fix issue where getting ignored articles doesn't work in supysonic

parent b93be94b
Pipeline #201585536 passed with stages
in 12 minutes and 16 seconds
......@@ -641,15 +641,19 @@ class SubsonicAdapter(Adapter):
return artist
def get_ignored_articles(self) -> Set[str]:
ignored_articles = ""
ignored_articles = "The El La Los Las Le Les"
try:
# If we already got the ignored articles from the get_artists, do that here.
with open(self.ignored_articles_cache_file, "rb+") as f:
ignored_articles = pickle.load(f)
except Exception:
# Whatever the exception, fall back on getting from the server.
if artists := self._get_json(self._make_url("getArtists")).artists:
ignored_articles = artists.ignored_articles
try:
# Whatever the exception, fall back on getting from the server.
if artists := self._get_json(self._make_url("getArtists")).artists:
ignored_articles = artists.ignored_articles
except Exception:
# Use the default ignored articles.
pass
return set(ignored_articles.split())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment