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:
@@ -94,10 +94,13 @@ else
|
||||
protected override string PersistKey => "session-detail";
|
||||
|
||||
[CascadingParameter] public IStreamingPlayerService? PlayerService { get; set; }
|
||||
[CascadingParameter] public IQueueService? Queue { get; set; }
|
||||
|
||||
// Mirrors the play-toggle wiring the shared scaffold owns. Session detail composes the player
|
||||
// affordance directly (it diverges from ReleaseDetailScaffold for the overlay layout), so the
|
||||
// toggle logic lives here: toggle if this track is already active, otherwise start a fresh stream.
|
||||
// toggle logic lives here: toggle if this track is already 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.
|
||||
private async Task PlayTrack()
|
||||
{
|
||||
var track = ViewModel.Track;
|
||||
@@ -108,6 +111,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