From 58fe9ae9e1962cf76335882cccdb7de273249ec9 Mon Sep 17 00:00:00 2001 From: Logykk <35679186+logykk@users.noreply.github.com> Date: Thu, 2 Dec 2021 17:20:32 +1300 Subject: [PATCH] Limit invoke_url retry's to 5 --- zspotify/zspotify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zspotify/zspotify.py b/zspotify/zspotify.py index 1738507..e535a9f 100644 --- a/zspotify/zspotify.py +++ b/zspotify/zspotify.py @@ -89,7 +89,7 @@ class ZSpotify: responseText = response.text responseJson = response.json() - if 'error' in responseJson and tryCount < 20: + if 'error' in responseJson and tryCount < 5: Printer.Print(PrintChannel.API_ERROR, f"Spotify API Error ({responseJson['error']['status']}): {responseJson['error']['message']}") time.sleep(5)