feat(local-library): multi-track selection on tracks tab (#326)

Mirrors the pattern already used in FavoritesView so users can select
multiple local tracks and bulk-add them to the queue (play next / play
later) or to a playlist — the same way it works for Qobuz favorites
and playlists.

- New `trackSelectMode` + `selectedTrackIds` state + handlers (toggle
  mode, toggle row, bulk play next/later, bulk add to playlist).
- New `SquareCheckBig` toolbar button on the tracks tab (matches the
  one in FavoritesView).
- VirtualizedTrackList wired with `selectable`, `selectedIds`,
  `onToggleSelect` props (already supported, just unused here).
- `<BulkActionBar>` rendered below the list when selection is active.
- New `onBulkAddToPlaylist` prop, wired in +page.svelte to
  `openAddToPlaylist(trackIds, true)` so the existing playlist picker
  modal handles the rest.
- Bulk play next/later go through `cmdAddTracksToQueue` /
  `cmdAddTracksToQueueNext` (route to qbzd when remote, otherwise local
  bulk command). Plex tracks are filtered out only for "add to
  playlist" (per existing per-row guard); they're fine in the queue.

cc
This commit is contained in:
vicrodh committed 2026-04-16 20:16:02 -06:00
1 parent 6775d3a474
commit 261676550c
2 files changed
+71 -1

No files matched your search

+1
View File
@@ -5525,6 +5525,7 @@
onTrackPlayNext={queueLocalTrackNext}
onTrackPlayLater={queueLocalTrackLater}
onTrackAddToPlaylist={(trackId) => openAddToPlaylist([trackId], true)}
onBulkAddToPlaylist={(trackIds) => openAddToPlaylist(trackIds, true)}
onSetLocalQueue={handleSetLocalQueue}
onQobuzArtistClick={handleArtistClick}
activeTrackId={currentTrack?.id ?? null}