Skip to content

fix(albums): page through full tracklist instead of capping at 50#339

Merged
LargeModGames merged 1 commit into
mainfrom
fix-album-tracklist-pagination
Jul 5, 2026
Merged

fix(albums): page through full tracklist instead of capping at 50#339
LargeModGames merged 1 commit into
mainfrom
fix-album-tracklist-pagination

Conversation

@LargeModGames

Copy link
Copy Markdown
Owner

Summary

Albums with more than 50 tracks were cut off because every path into the AlbumTracks screen only used the first page Spotify returns:

  • get_album_tracks (search results, artist discography, go-to-album from a track) fetched a single page of 50 with a literal TODO: Handle pagination comment
  • get_album trusted the tracklist embedded in FullAlbum, which is silently just the first page
  • Opening a saved album from the library rendered the same capped cache from me/albums

This adds a fetch_album_tracks_from helper that follows next until the tracklist is complete (mirroring the existing artist-albums pagination loop), extends FullAlbum's embedded page before mapping to the domain type, and makes the saved-albums Enter handler refetch via GetAlbum when the cached tracklist is shorter than total_tracks. Complete albums still open instantly from cache.

Closes #324

Testing

  • cargo fmt --all
  • cargo clippy --no-default-features --features telemetry -- -D warnings
  • cargo test --no-default-features --features telemetry (351 passed, includes 2 new regression tests for the cache-vs-refetch decision)
  • cargo check (full features)

Spotify returns album tracks 50 per page. All three paths into the
AlbumTracks screen only ever used the first page: get_album_tracks
fetched a single page, get_album trusted the first-page tracklist
embedded in FullAlbum, and the saved-albums library rendered the
same capped cache from me/albums. Albums longer than 50 tracks were
silently cut off.

Add a pagination loop that follows `next` until the tracklist is
complete, extend FullAlbum's embedded page before mapping, and make
the saved-albums Enter handler refetch via GetAlbum when the cached
tracklist is shorter than total_tracks.

Closes #324
@LargeModGames LargeModGames merged commit 6837c61 into main Jul 5, 2026
15 checks passed
@LargeModGames LargeModGames deleted the fix-album-tracklist-pagination branch July 5, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Album tracklist cuts off at 50 songs

1 participant