Update most listened song.
This commit is contained in:
parent
8f16b5d96f
commit
e84a811a1d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user