feat: cycle the queue through track shuffle, album shuffle and off
North on the now-playing screen, or s anywhere, shuffles what has not played yet. Off goes back to the order the tracks were queued in and carries on after the playing track. Tracks queued while shuffled go to random positions, an album as one block under album shuffle. The player reorders its own list under its lock and keeps a track it already handed to playbin next, so playback stays gapless. Each reorder bumps a queue generation that track and picture events carry, and the app drops an event sent before the last reorder. The saved queue keeps the original order and the mode; older files load unshuffled.
This commit is contained in:
+2
-1
@@ -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,
|
||||
volume-up, volume-down, toggle-mute, cycle-shuffle,
|
||||
}
|
||||
|
||||
export enum Screen { login, browse, now-playing }
|
||||
@@ -1305,6 +1305,7 @@ export component AppWindow inherits Window {
|
||||
if (e.text == "+" || e.text == "=") { root.action(Action.volume-up); return accept; }
|
||||
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; }
|
||||
reject
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<mask id="letter">
|
||||
<rect width="64" height="64" fill="#FFFFFF"/>
|
||||
<path fill="none" stroke="#000000" stroke-width="4" stroke-linecap="square" d="M38 25.5 Q36.5 24 32 24 Q26 24 26 28 Q26 32 32 32 Q38 32 38 36 Q38 40 32 40 Q27.5 40 26 38.5"/>
|
||||
</mask>
|
||||
</defs>
|
||||
<path stroke="none" fill="#FFFFFF" mask="url(#letter)" d="M16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 499 B |
Reference in New Issue
Block a user