fix get_my_favorite_tracks when user has no favorite tracks

This commit is contained in:
RemixDev 2021-12-23 17:11:15 +01:00
parent c01a63c29c
commit 69880e2389
No known key found for this signature in database
GPG key ID: B33962B465BDB51C

View file

@ -372,6 +372,7 @@ class GW:
def get_my_favorite_tracks(self, limit=25):
ids_raw = self.get_user_favorite_ids(limit=limit)
ids = [ x['SNG_ID'] for x in ids_raw['data'] ]
if len(ids) == 0: return []
data = self.get_tracks(ids)
result = []
for (i, track) in enumerate(data):