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
+2 -1
View File
@@ -145,7 +145,6 @@ func (s *Server) Router() http.Handler {
)
quarantineSvc := quarantine.NewService(s.Pool, s.DataDir)
tracksSvc := tracks.NewService(s.Pool, s.Logger, s.DataDir)
playlistsSvc := playlists.NewService(s.Pool, s.Logger, s.DataDir)
smtpSender := mailer.NewSMTPSender(s.Pool, s.Logger.With("component", "mailer"))
// Live-event bus for SSE subscribers, one per process: producers in
// playevents / scanner publish into the same instance.
@@ -156,6 +155,8 @@ func (s *Server) Router() http.Handler {
if bus == nil {
bus = eventbus.New()
}
playlistsSvc := playlists.NewService(s.Pool, s.Logger, s.DataDir)
playlistsSvc.PublishTo(bus)
recSettings := s.RecSettings
if recSettings == nil {
// Test contexts construct Server directly without main.go's