diff --git a/main.py b/main.py index 5aface7..3598f4f 100644 --- a/main.py +++ b/main.py @@ -28,6 +28,10 @@ while True: else: offset += limit + # Break the loop if we reach the end + if len(results['items']) == 0: + break + saved_tracks.extend(results['items'])