From 980156ea92b555d950057cab3c35b80e12f924f2 Mon Sep 17 00:00:00 2001 From: Crussader <75786691+Crussader@users.noreply.github.com> Date: Mon, 28 Mar 2022 09:04:38 +0400 Subject: [PATCH] extra if statement `if raw:` and comments --- pomice/spotify/client.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pomice/spotify/client.py b/pomice/spotify/client.py index e698108..f5d2113 100644 --- a/pomice/spotify/client.py +++ b/pomice/spotify/client.py @@ -116,7 +116,8 @@ class Client: cls.tracks = tracks - if cls.total_tracks == 0: + if cls.total_tracks == 0: + # for artists i use len(tracks) so it will be zero at first cls.total_tracks = len(tracks) return cls @@ -142,9 +143,6 @@ class Client: data = await resp.json(loads=json.loads) - if raw: - return data - if spotify_type == 'track': return Track(data) elif spotify_type == 'album':