1
0

Amount of listeners of next song is actually how much listeners was by the end of a prev song.

This commit is contained in:
Alexander Andreev 2023-03-13 01:42:00 +04:00
parent 3207395b67
commit f24953ae7c
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -193,6 +193,7 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) {
if currentlyPlaying.Time == "" { if currentlyPlaying.Time == "" {
currentlyPlaying = songs[0] currentlyPlaying = songs[0]
} else { } else {
currentlyPlaying.Listeners = songs[0].Listeners
if len(lastPlayedCache) == n { if len(lastPlayedCache) == n {
lastPlayedCache = append(lastPlayedCache[1:], currentlyPlaying) lastPlayedCache = append(lastPlayedCache[1:], currentlyPlaying)
} else { } else {