fix: PlayRelease always materialises a defensive copy so Items alias can't wipe the queue on jump; add aliasing regression test

This commit is contained in:
daniel-c-harvey
2026-06-19 15:23:20 -04:00
parent fe3819f378
commit 9d0ce99a5d
2 changed files with 28 additions and 1 deletions
@@ -56,7 +56,7 @@ public sealed class QueueService : IQueueService, IDisposable
public async Task PlayRelease(IEnumerable<TrackDto> tracks, int startIndex = 0)
{
var list = tracks as IReadOnlyList<TrackDto> ?? tracks.ToList();
var list = tracks.ToList();
if (list.Count == 0) return;
var start = Math.Clamp(startIndex, 0, list.Count - 1);