feat(queue): two-level deque model — PLAY prepends, add appends, last-track-end empties
Fixes five queue bugs: Playlist relabel, last-track-empties, dormant-seed-from-player on first add, immediate panel reactivity, and front/back deque semantics. Adds JumpTo for row jumps.
This commit is contained in:
@@ -100,10 +100,13 @@ else
|
||||
protected override string PersistKey => "mix-detail";
|
||||
|
||||
[CascadingParameter] public IStreamingPlayerService? PlayerService { get; set; }
|
||||
[CascadingParameter] public IQueueService? Queue { get; set; }
|
||||
|
||||
// The hero now carries the play affordance (the scaffold's header is suppressed), so the
|
||||
// play-toggle is wired here directly — mirroring SessionDetail. Toggle if this track is already
|
||||
// active, otherwise start a fresh stream.
|
||||
// active, otherwise PLAY it: prepend to the queue's front (deque PLAY semantics) so it becomes
|
||||
// current and the existing queue stays intact behind it. Falls back to a direct stream when the
|
||||
// queue cascade is absent (prerender / non-interactive).
|
||||
private async Task PlayTrack()
|
||||
{
|
||||
var track = ViewModel.Track;
|
||||
@@ -114,6 +117,10 @@ else
|
||||
{
|
||||
await PlayerService.TogglePlayPause();
|
||||
}
|
||||
else if (Queue is not null)
|
||||
{
|
||||
await Queue.PlayTrack(track);
|
||||
}
|
||||
else
|
||||
{
|
||||
await PlayerService.SelectTrackStreaming(track);
|
||||
|
||||
Reference in New Issue
Block a user