feat(playlists): changes a phone queues offline are safe to send twice (#8023)
release / go (push) Successful in 1m59s
release / web (push) Successful in 1m23s
release / govulncheck (push) Successful in 22s
release / integration (push) Successful in 4m38s
release / android (push) Successful in 4m45s
release / Build signed APK (push) Successful in 5m22s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 17s
release / Verify release artifacts (tag releases only) (push) Skipped

- A new playlist can carry the client's own id; sending the create
  again finds the same list.
- Removing a song can name the song expected at that position; if
  another song is there now, nothing is removed (409 list_changed).
- A reorder can give the songs in their new order (track_ids); sending
  it again changes nothing.
- The playlist service tells the owner's clients about every change
  itself, so a change made from a Subsonic app refreshes the web and
  Android apps too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 10:22:40 -05:00
co-authored by Claude Opus 5.5
parent 1df91678ba
commit a77f3ae6ff
9 changed files with 421 additions and 88 deletions
+1 -1
View File
@@ -385,7 +385,7 @@ func TestRemoveTrack_RenumbersPositions(t *testing.T) {
_ = svc.AppendTracks(context.Background(), user.ID, pl.ID, []pgtype.UUID{t1.ID, t2.ID, t3.ID})
// Remove the middle one (position 1).
if err := svc.RemoveTrack(context.Background(), user.ID, pl.ID, 1); err != nil {
if err := svc.RemoveTrack(context.Background(), user.ID, pl.ID, 1, pgtype.UUID{}); err != nil {
t.Fatalf("RemoveTrack: %v", err)
}