web: remove tracks from a playlist#20
Merged
Merged
Conversation
There was no way to take a track out of a playlist from the web UI: removePlaylistTrack existed but nothing called it, dragging a row only reorders, and the bulk DELETE removes tracks from the whole library. Add the two missing affordances, both scoped to regular playlist views (smart playlists are rule-driven, and Collection and History have no membership to edit): a per-row x button that drops that track from the playlist, and a bulk-bar "- PLAYLIST" button that drops the whole selection in one update. The per-row handler resolves the playlist index by track ID rather than row index, so an active search filter or column sort cannot misalign the removal. The bulk path deselects only the removed tracks, so a selection spanning other sources survives, and postPlaylistTrackIDs now reports success so the toast only fires when the update actually landed. Library rows, tags, cues, and other playlists are untouched by either path. Verified headlessly end to end: per-row removal under an active BPM sort takes out the right track, bulk removal empties the playlist and leaves the collection intact, and neither affordance renders in Collection or smart-playlist views; no console errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
There was no way to take a track out of a playlist from the web UI: removePlaylistTrack existed but nothing called it, dragging a row only reorders, and the bulk DELETE removes the track from the entire library.
This adds the two missing affordances, both scoped to regular playlist views: a per-row x button that drops that track from the playlist, and a bulk-bar "- PLAYLIST" button that drops the whole selection in one update. Smart playlists are excluded since membership is rule-driven, and Collection and History have no membership to edit.
The per-row handler resolves the playlist index by track ID rather than visible row index, so an active search filter or column sort cannot misalign the removal. The bulk path deselects only the removed tracks so a selection spanning other sources survives, and postPlaylistTrackIDs now reports success so the toast only fires when the update actually landed. Library rows, tags, cues, and other playlists are untouched by either path.
Verified headlessly end to end with Playwright: per-row removal under an active BPM sort takes out the right track, bulk removal empties the playlist and leaves the collection intact, the removed track stays in the library, and neither affordance renders in Collection or smart-playlist views; no console errors.
Hardware testing
Checklist
go build ./...,go vet ./..., andgo test ./...passgofmt -l .is cleanGPL-3.0-or-later) (n/a, no new files)