[GH-ISSUE #782] [Feature] Paginate very large playlists #1404

Closed
opened 2026-03-14 14:40:05 +03:00 by kerem · 3 comments
Owner

Originally created by @RiverOmega on GitHub (Jul 28, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/782

Is your feature already implemented in the latest master?
No

Is your feature request related to a problem? Please describe.
Not sure, tried searching the issues but came up empty.

Describe the solution you'd like
When loading a very large playlist (thousands upon thousands of songs) the client takes a long time indexing all of them. Instead, it would be nice if the client could load pages (size around 100 maybe?) progressively as you scroll/play along.

Describe alternatives you've considered
Pagination is a common concept when handling large lists, I haven't really considered other alternatives.

Additional context
No

Originally created by @RiverOmega on GitHub (Jul 28, 2025). Original GitHub issue: https://github.com/aome510/spotify-player/issues/782 **Is your feature already implemented in the latest `master`?** No **Is your feature request related to a problem? Please describe.** Not sure, tried searching the issues but came up empty. **Describe the solution you'd like** When loading a very large playlist (thousands upon thousands of songs) the client takes a long time indexing all of them. Instead, it would be nice if the client could load pages (size around 100 maybe?) progressively as you scroll/play along. **Describe alternatives you've considered** Pagination is a common concept when handling large lists, I haven't really considered other alternatives. **Additional context** No
kerem 2026-03-14 14:40:05 +03:00
Author
Owner

@aome510 commented on GitHub (Aug 5, 2025):

The pagination logic can probably be implemented by spawning an async task in background that lazily fetches the track data page-by-page and update the data stored in the state. In other words, the task should implement the logic in github.com/aome510/spotify-player@b92c7379b1/spotify_player/src/client/mod.rs (L1318-L1323)

but instead update the state upon fetching a new page.

<!-- gh-comment-id:3155558587 --> @aome510 commented on GitHub (Aug 5, 2025): The pagination logic can probably be implemented by spawning an async task in background that **lazily** fetches the track data page-by-page and update the data stored in the state. In other words, the task should implement the logic in https://github.com/aome510/spotify-player/blob/b92c7379b192e6492ec37b722ecb9934e6803c2f/spotify_player/src/client/mod.rs#L1318-L1323 but instead update the state upon fetching a new page.
Author
Owner

@aome510 commented on GitHub (Sep 6, 2025):

Duplicate of #502

<!-- gh-comment-id:3260169190 --> @aome510 commented on GitHub (Sep 6, 2025): Duplicate of #502
Author
Owner

@aaratha commented on GitHub (Dec 23, 2025):

I’d be interested in taking a crack at this. I'm thinking a PagedList struct could be implemented in state::model and replace Vec<Track> in Context::Tracks, so liked tracks and large playlists can share paging logic. Shuffling could be problematic, but I guess there are two options: (1) fetch remaining pages on demand (async, with a progress indicator) before shuffling, or (2) maintain a lightweight full list of track IDs/URIs for shuffle while paging full track data for UI. Curious to hear thoughts about this.

<!-- gh-comment-id:3684772400 --> @aaratha commented on GitHub (Dec 23, 2025): I’d be interested in taking a crack at this. I'm thinking a `PagedList` struct could be implemented in `state::model` and replace `Vec<Track>` in `Context::Tracks`, so liked tracks and large playlists can share paging logic. Shuffling could be problematic, but I guess there are two options: (1) fetch remaining pages on demand (async, with a progress indicator) before shuffling, or (2) maintain a lightweight full list of track IDs/URIs for shuffle while paging full track data for UI. Curious to hear thoughts about this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1404
No description provided.