extra if statement `if raw:` and comments
This commit is contained in:
parent
2c59279c83
commit
980156ea92
|
|
@ -116,7 +116,8 @@ class Client:
|
||||||
|
|
||||||
|
|
||||||
cls.tracks = tracks
|
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)
|
cls.total_tracks = len(tracks)
|
||||||
|
|
||||||
return cls
|
return cls
|
||||||
|
|
@ -142,9 +143,6 @@ class Client:
|
||||||
|
|
||||||
data = await resp.json(loads=json.loads)
|
data = await resp.json(loads=json.loads)
|
||||||
|
|
||||||
if raw:
|
|
||||||
return data
|
|
||||||
|
|
||||||
if spotify_type == 'track':
|
if spotify_type == 'track':
|
||||||
return Track(data)
|
return Track(data)
|
||||||
elif spotify_type == 'album':
|
elif spotify_type == 'album':
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue