🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
fix(subsonic): fix support for LegacyClients
Deluan4d4740b83b11
diff --git a/server/subsonic/helpers.go b/server/subsonic/helpers.goindex dfeb4c6dd..5bc709ecb 100644--- a/server/subsonic/helpers.go+++ b/server/subsonic/helpers.go@@ -240,7 +240,7 @@ func childFromMediaFile(ctx context.Context, mf model.MediaFile) responses.Childfunc osChildFromMediaFile(ctx context.Context, mf model.MediaFile) *responses.OpenSubsonicChild {player, ok := request.PlayerFrom(ctx)- if ok && isClientInList(conf.Server.Subsonic.MinimalClients, player.Client) {+ if ok && isClientInList(conf.Server.Subsonic.LegacyClients, player.Client) {return nil}child := responses.OpenSubsonicChild{}diff --git a/server/subsonic/helpers_test.go b/server/subsonic/helpers_test.goindex 6a122a3c7..2099c8f69 100644--- a/server/subsonic/helpers_test.go+++ b/server/subsonic/helpers_test.go@@ -308,10 +308,10 @@ var _ = Describe("helpers", func() {ctx = context.Background()})- Context("with minimal client", func() {+ Context("with legacy client", func() {BeforeEach(func() {- conf.Server.Subsonic.MinimalClients = "minimal-client"- player := model.Player{Client: "minimal-client"}+ conf.Server.Subsonic.LegacyClients = "legacy-client"+ player := model.Player{Client: "legacy-client"}ctx = request.WithPlayer(ctx, player)})@@ -321,9 +321,9 @@ var _ = Describe("helpers", func() {})})- Context("with non-minimal client", func() {+ Context("with non-legacy client", func() {BeforeEach(func() {- conf.Server.Subsonic.MinimalClients = "minimal-client"+ conf.Server.Subsonic.LegacyClients = "legacy-client"player := model.Player{Client: "regular-client"}ctx = request.WithPlayer(ctx, player)})@@ -335,9 +335,9 @@ var _ = Describe("helpers", func() {})})- Context("when minimal clients list is empty", func() {+ Context("when legacy clients list is empty", func() {BeforeEach(func() {- conf.Server.Subsonic.MinimalClients = ""+ conf.Server.Subsonic.LegacyClients = ""player := model.Player{Client: "any-client"}ctx = request.WithPlayer(ctx, player)})