summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-11-09 08:54:59 +0100
committerRobert Honz <exislow+github@gmail.com>2024-11-09 08:54:59 +0100
commit4012edfed3ace994c1b70f922eb79c5964ea6208 (patch)
treefb886bec746c37d329b52c404aa9d641177c9741
parent0bbe3c85a9681a987f33d0594fc84a5c7bf68bcc (diff)
downloadtidal-dl-ng-4012edfed3ace994c1b70f922eb79c5964ea6208.tar.gz
Bug fix: Pagination for user playlists loading more than 50 items now. Fixes #131
-rw-r--r--tidal_dl_ng/helper/tidal.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tidal_dl_ng/helper/tidal.py b/tidal_dl_ng/helper/tidal.py
index a85b7f3..d679d5e 100644
--- a/tidal_dl_ng/helper/tidal.py
+++ b/tidal_dl_ng/helper/tidal.py
@@ -136,11 +136,11 @@ def paginate_results(func_get_items_media: [Callable]) -> [Track | Video | Album
offset: int = 0
done: bool = False
+ if func_media.__func__ == LoggedInUser.playlist_and_favorite_playlists:
+ limit: int = 50
+
while not done:
- if func_media.__func__ == LoggedInUser.playlist_and_favorite_playlists:
- tmp_result: [Playlist | UserPlaylist] = func_media(offset=offset)
- else:
- tmp_result: [Track | Video | Album] = func_media(limit=limit, offset=offset)
+ tmp_result: [Track | Video | Album | Playlist | UserPlaylist] = func_media(limit=limit, offset=offset)
if bool(tmp_result):
result += tmp_result