From 03fd760589dda20a03d0cc80baaaf17889bfa5c2 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Wed, 11 Mar 2026 07:38:58 -0700 Subject: [PATCH] use JSON instead of XML in Subsonic API --- backend/mediaprovider/subsonic/subsonicmediaprovider.go | 2 +- backend/servermanager.go | 2 ++ go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/mediaprovider/subsonic/subsonicmediaprovider.go b/backend/mediaprovider/subsonic/subsonicmediaprovider.go index 7a4f1bd..c686a67 100644 --- a/backend/mediaprovider/subsonic/subsonicmediaprovider.go +++ b/backend/mediaprovider/subsonic/subsonicmediaprovider.go @@ -53,7 +53,7 @@ func (s *subsonicMediaProvider) GetLibraries() ([]mediaprovider.Library, error) return nil, err } return sharedutil.MapSlice(folders, func(f *subsonic.MusicFolder) mediaprovider.Library { - return mediaprovider.Library{ID: f.ID, Name: f.Name} + return mediaprovider.Library{ID: strconv.Itoa(f.ID), Name: f.Name} }), nil } diff --git a/backend/servermanager.go b/backend/servermanager.go index c280beb..6ceb2dc 100644 --- a/backend/servermanager.go +++ b/backend/servermanager.go @@ -220,6 +220,7 @@ func (s *ServerManager) connect(connection ServerConnection, password string) (m User: connection.Username, PasswordAuth: connection.LegacyAuth, ClientName: res.AppName, + UseJSON: true, }, } s.checkSetInsecureSkipVerify(connection.SkipSSLVerify, cli.(*subsonicMP.SubsonicServer).Client.Client) @@ -231,6 +232,7 @@ func (s *ServerManager) connect(connection ServerConnection, password string) (m User: connection.Username, PasswordAuth: connection.LegacyAuth, ClientName: res.AppName, + UseJSON: true, }, } s.checkSetInsecureSkipVerify(connection.SkipSSLVerify, altCli.(*subsonicMP.SubsonicServer).Client.Client) diff --git a/go.mod b/go.mod index 70ae4b3..6daf0d4 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/quarckster/go-mpris-server v1.0.3 github.com/supersonic-app/fyne-lyrics v0.0.0-20250614151306-b1880a70a410 github.com/supersonic-app/go-mpv v0.1.1-0.20250822102843-7a8cde5f5449 - github.com/supersonic-app/go-subsonic v0.0.0-20260125165421-1efaa048a150 + github.com/supersonic-app/go-subsonic v0.0.0-20260311143343-43acfbb184d2 github.com/supersonic-app/go-upnpcast v0.1.0 github.com/zalando/go-keyring v0.2.6 golang.org/x/net v0.50.0 diff --git a/go.sum b/go.sum index 28146a2..6a4e929 100644 --- a/go.sum +++ b/go.sum @@ -127,8 +127,8 @@ github.com/supersonic-app/fyne-lyrics v0.0.0-20250614151306-b1880a70a410 h1:wuDH github.com/supersonic-app/fyne-lyrics v0.0.0-20250614151306-b1880a70a410/go.mod h1:XvGBPgXWkKrK+5OsoVkTcTZmwZac1Sj6miEn8q6uA20= github.com/supersonic-app/go-mpv v0.1.1-0.20250822102843-7a8cde5f5449 h1:UHIPI43VzyWuIF8z8WVMdjMsC/orZTZQJraD/Iv+ghw= github.com/supersonic-app/go-mpv v0.1.1-0.20250822102843-7a8cde5f5449/go.mod h1:1bQz6kBQumJopXEbkiqoLxIXLy7F7yWFBvknvpAtIC0= -github.com/supersonic-app/go-subsonic v0.0.0-20260125165421-1efaa048a150 h1:Wh3EUdJI8bSr2nYtnkmG+bGNzEtGGSW3Rcg4eDM1a0M= -github.com/supersonic-app/go-subsonic v0.0.0-20260125165421-1efaa048a150/go.mod h1:ClhAgC2qobwH19D6kdwULLYSHlOmldDGkdu2G2Z0Ijo= +github.com/supersonic-app/go-subsonic v0.0.0-20260311143343-43acfbb184d2 h1:VtrqvDwb44RSErifxchVKYdCf62/cO2Cumyz+uPlqkI= +github.com/supersonic-app/go-subsonic v0.0.0-20260311143343-43acfbb184d2/go.mod h1:ClhAgC2qobwH19D6kdwULLYSHlOmldDGkdu2G2Z0Ijo= github.com/supersonic-app/go-upnpcast v0.1.0 h1:SL0WVgnqvAVaLT9MSRhSeVwF9pcUw1cgBITKVoWXN3g= github.com/supersonic-app/go-upnpcast v0.1.0/go.mod h1:o/QGDTK3qdaS3h9Bt8aH5ywgbWbrPVzPCHlZYFs0IHY= github.com/yuin/goldmark v1.7.16 h1:n+CJdUxaFMiDUNnWC3dMWCIQJSkxH4uz3ZwQBkAlVNE=