From f24953ae7c74241f90be61879e1cd26361867f33 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 13 Mar 2023 01:42:00 +0400 Subject: [PATCH] Amount of listeners of next song is actually how much listeners was by the end of a prev song. --- internal/radio/icecast.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index d7b406e..9d040f3 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -193,6 +193,7 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) { if currentlyPlaying.Time == "" { currentlyPlaying = songs[0] } else { + currentlyPlaying.Listeners = songs[0].Listeners if len(lastPlayedCache) == n { lastPlayedCache = append(lastPlayedCache[1:], currentlyPlaying) } else {