From 82b1bd26ad6c99270f40fca13e000a13c99b5955 Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 23 Jan 2026 16:52:21 -0500 Subject: [PATCH] fix build after merge Signed-off-by: Deluan --- server/subsonic/media_annotation.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/subsonic/media_annotation.go b/server/subsonic/media_annotation.go index b715f711f..171c54be1 100644 --- a/server/subsonic/media_annotation.go +++ b/server/subsonic/media_annotation.go @@ -112,6 +112,7 @@ func (api *Router) setStar(ctx context.Context, star bool, ids ...string) error return nil } event := &events.RefreshResource{} + broadcastToAll := false err := api.ds.WithTxImmediate(func(tx model.DataStore) error { for _, id := range ids { exist, err := tx.Album(ctx).Exists(id) @@ -149,7 +150,7 @@ func (api *Router) setStar(ctx context.Context, star bool, ids ...string) error } event = event.With("playlist", "*") // Ensure the refresh event is sent to all clients, including the originator - ctx = events.BroadcastToAll(ctx) + broadcastToAll = true continue } err = tx.MediaFile(ctx).SetStar(star, id) @@ -158,7 +159,11 @@ func (api *Router) setStar(ctx context.Context, star bool, ids ...string) error } event = event.With("song", id) } - api.broker.SendMessage(ctx, event) + if broadcastToAll { + api.broker.SendBroadcastMessage(ctx, event) + } else { + api.broker.SendMessage(ctx, event) + } return nil }) if err != nil {