From f3754dc51ba4b5dac4c61d58cf63cf5c5cd45b46 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 1 Oct 2020 16:04:11 +0200 Subject: [PATCH] Added exception for when lyrics don't exsist --- deemix/app/track.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deemix/app/track.py b/deemix/app/track.py index e89de55..4e39b91 100644 --- a/deemix/app/track.py +++ b/deemix/app/track.py @@ -130,7 +130,10 @@ class Track: } if not "LYRICS" in trackAPI_gw and self.lyrics['id'] != 0: logger.info(f"[{trackAPI_gw['ART_NAME']} - {self.title}] Getting lyrics") - trackAPI_gw["LYRICS"] = dz.get_lyrics_gw(self.id) + try: + trackAPI_gw["LYRICS"] = dz.get_lyrics_gw(self.id) + except APIError: + self.lyrics['id'] = 0 if self.lyrics['id'] != 0: self.lyrics['unsync'] = trackAPI_gw["LYRICS"].get("LYRICS_TEXT") if "LYRICS_SYNC_JSON" in trackAPI_gw["LYRICS"]: