Amount of listeners of next song is actually how much listeners was by the end of a prev song.
This commit is contained in:
parent
3207395b67
commit
f24953ae7c
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user