feat: shuffle play an album, artist or playlist with a long press

Holding South on a row, or shift+s on the keyboard, plays its tracks in
random order with track shuffle on, so turning shuffle off goes back to
their own order. On a song row it shuffles the page the song is on. An
artist plays every track of every album, fetched a few albums at a time.

South now acts on release, so a long press can mean something else. A
long press on a row with nothing to shuffle activates as before.
This commit is contained in:
Ansho Rei
2026-11-05 19:04:08 +01:00
parent 3d91739447
commit e11d95daa5
7 changed files with 167 additions and 4 deletions
+2 -1
View File
@@ -9,7 +9,7 @@ export enum Action {
none, up, down, left, right, page-up, page-down, activate, back,
play-pause, next, prev, queue, section-next, section-prev,
now-playing, search, seek-forward, seek-back, toggle-fullscreen, quit,
volume-up, volume-down, toggle-mute, cycle-shuffle,
volume-up, volume-down, toggle-mute, cycle-shuffle, shuffle, hold-activate,
}
export enum Screen { login, browse, now-playing }
@@ -1306,6 +1306,7 @@ export component AppWindow inherits Window {
if (e.text == "-") { root.action(Action.volume-down); return accept; }
if (e.text == "m") { root.action(Action.toggle-mute); return accept; }
if (e.text == "s") { root.action(Action.cycle-shuffle); return accept; }
if (e.text == "S") { root.action(Action.shuffle); return accept; }
reject
}