From e84a811a1d49b53df9541daddacf67ebf3f8dce2 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 13 Mar 2023 00:04:34 +0400 Subject: [PATCH] Update most listened song. --- internal/radio/icecast.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index fc57a46..d7b406e 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -189,6 +189,7 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) { if mask&syscall.IN_MODIFY > 0 { lastPlayedCacheMutex.Lock() if songs, err := icecastLastPlayedSongs(playlistPath, 1); err == nil && len(songs) > 0 { + CheckAndUpdateMostListenedSong(songs[0], currentlyPlaying) if currentlyPlaying.Time == "" { currentlyPlaying = songs[0] } else {