Merge pull request #215 from exislow/131-bug-not-all-playlists-being-shown
Bug fix: Pagination for user playlists loading more than 50 items now…
This commit is contained in:
@@ -136,11 +136,11 @@ def paginate_results(func_get_items_media: [Callable]) -> [Track | Video | Album
|
|||||||
offset: int = 0
|
offset: int = 0
|
||||||
done: bool = False
|
done: bool = False
|
||||||
|
|
||||||
while not done:
|
|
||||||
if func_media.__func__ == LoggedInUser.playlist_and_favorite_playlists:
|
if func_media.__func__ == LoggedInUser.playlist_and_favorite_playlists:
|
||||||
tmp_result: [Playlist | UserPlaylist] = func_media(offset=offset)
|
limit: int = 50
|
||||||
else:
|
|
||||||
tmp_result: [Track | Video | Album] = func_media(limit=limit, offset=offset)
|
while not done:
|
||||||
|
tmp_result: [Track | Video | Album | Playlist | UserPlaylist] = func_media(limit=limit, offset=offset)
|
||||||
|
|
||||||
if bool(tmp_result):
|
if bool(tmp_result):
|
||||||
result += tmp_result
|
result += tmp_result
|
||||||
|
|||||||
Reference in New Issue
Block a user