From 65deb9b4d47f6a62d25f23c5a21eac8e4adbeefc Mon Sep 17 00:00:00 2001 From: Myned Date: Wed, 23 Feb 2022 16:20:59 -0600 Subject: [PATCH] Fix Unknown artist when in title --- tools/scraper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/scraper.py b/tools/scraper.py index b5c11a1..6420072 100644 --- a/tools/scraper.py +++ b/tools/scraper.py @@ -27,7 +27,9 @@ async def _saucenao(url): return ( { "url": results[0].url, - "artist": ", ".join(results[0].authors) or "Unknown", + "artist": results[0].title + if results[0].author_name == "Unknown" + else ", ".join(results[0].authors) or "Unknown", "thumbnail": results[0].thumbnail, "similarity": round(results[0].similarity), "source": tldextract.extract(results[0].index).domain,