From 07b0199193cccbe57800008d00481ff64db50fd6 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 7 Oct 2023 05:20:27 +0400 Subject: [PATCH] In a PlaylistNext() handler pass a current song as a copy. --- internal/http/dj_handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/http/dj_handlers.go b/internal/http/dj_handlers.go index 0515557..c549944 100644 --- a/internal/http/dj_handlers.go +++ b/internal/http/dj_handlers.go @@ -65,7 +65,7 @@ func (dj *DJHandlers) PlaylistNext(w http.ResponseWriter, _ *http.Request) { Duration: oggf.GetDuration(), MaxListeners: dj.listeners.Current(), StartAt: time.Now()} - radio.CheckAndUpdateMostListenedSong(dj.songList.Current()) + radio.CheckAndUpdateMostListenedSong(*dj.songList.Current()) dj.songList.Add(song) }() }