mirror of
https://github.com/navidrome/navidrome.git
synced 2025-12-23 23:18:05 -05:00
feat(ui): implement new event stream connection logic
Added a new event stream connection method to enhance the handling of server events. This includes a reconnect mechanism for improved reliability in case of connection errors. The configuration now allows toggling the new event stream feature via `devNewEventStream`. Additionally, tests were added to ensure the new functionality works as expected, including reconnection behavior after an error. Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -67,6 +67,7 @@ func serveIndex(ds model.DataStore, fs fs.FS, shareInfo *model.Share) http.Handl
|
||||
"lastFMEnabled": conf.Server.LastFM.Enabled,
|
||||
"devShowArtistPage": conf.Server.DevShowArtistPage,
|
||||
"devUIShowConfig": conf.Server.DevUIShowConfig,
|
||||
"devNewEventStream": conf.Server.DevNewEventStream,
|
||||
"listenBrainzEnabled": conf.Server.ListenBrainz.Enabled,
|
||||
"enableExternalServices": conf.Server.EnableExternalServices,
|
||||
"enableReplayGain": conf.Server.EnableReplayGain,
|
||||
|
||||
@@ -102,6 +102,7 @@ var _ = Describe("serveIndex", func() {
|
||||
Entry("defaultDownsamplingFormat", func() { conf.Server.DefaultDownsamplingFormat = "mp3" }, "defaultDownsamplingFormat", "mp3"),
|
||||
Entry("enableUserEditing", func() { conf.Server.EnableUserEditing = false }, "enableUserEditing", false),
|
||||
Entry("enableSharing", func() { conf.Server.EnableSharing = true }, "enableSharing", true),
|
||||
Entry("devNewEventStream", func() { conf.Server.DevNewEventStream = true }, "devNewEventStream", true),
|
||||
)
|
||||
|
||||
DescribeTable("sets other UI configuration values",
|
||||
|
||||
Reference in New Issue
Block a user