Skip to content

feat(library): shuffle-all button - #347

Open
laika02 wants to merge 1 commit into
ghenry22:masterfrom
laika02:library-shuffle-all
Open

laika02 wants to merge 1 commit into
ghenry22:masterfrom
laika02:library-shuffle-all

Conversation

@laika02

@laika02 laika02 commented Dec 2, 2026 •

Copy link
Copy Markdown

Summary

Adds a shuffle-all floating button to the Library, like Auxio's. It plays your library in random order from any of the Library's tabs, which is what #262 asks for.

Changes

  • New ShuffleAllButton: a rounded button at the bottom right of the Library, in the theme's accent colour.
    • It sits clear of the A-Z scroller and hides while that scroller is dragged, as Auxio's does.
    • It isn't shown on the Playlists tab, on Artists with the Downloaded filter on, or before the library has any songs.
  • New shuffleAllService. It follows the Library's Downloaded and Favorites filters, so in offline mode it only queues downloaded songs.
    • The whole-library queue is picked in SQL with the new listRandomSongs (ORDER BY RANDOM() LIMIT n).
    • Filtered sets are shuffled in JS and then cut to the limit.
  • New setting, Sound & Playback > Shuffle All Limit: 100, 250, 500 (default), 1,000 or 2,500 songs, or no limit. The screen's Reset to Defaults includes it.
  • New fastScrollStore tells the Library when the A-Z scroller is being dragged.

About the limit setting: I kept it separate from Appearance & Layout > List Length. That setting (default 20, max 100) sizes the Home lists, top songs, similar songs and the generated mixes. A whole-library shuffle wants a much bigger queue, and raising List Length to get one would resize everything else. If you'd rather it reuse List Length, I'm happy to change it.

Testing

  • npx tsc --noEmit passes
  • npx jest --no-coverage passes
  • New/updated tests added (if applicable): the service, button, setting card, the Library's show/hide rules, the scroller's drag flag, the new query, and the Sound & Playback reset (that screen had no tests before)
  • Tested on iOS
  • Tested on Android:
    • Real devices: a Pixel 10 and an A15.
    • Emulator: placement, tapping the button, hiding during an A-Z drag, and the setting card.

Also passing: validate-intl, validate-translations, madge --circular and validate:modules.

Screenshots

library-shuffle-all

Related Issues

Related: #262, #278

A floating button in the Library, after Auxio's, filled with the accent
colour. It plays a shuffled queue from the library, following the
Downloaded and Favorites filters, capped by a new Shuffle All Limit
setting in Sound & Playback (default 500 songs). It hides on the
Playlists tab and while the A-Z scroller is being dragged.

This branch has not been deployed

No deployments
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.

1 participant