1
0

First try to load currently playing song.

This commit is contained in:
Alexander Andreev 2023-03-13 01:53:52 +04:00
parent 2e60f2bb8a
commit 0fffbce646
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -182,6 +182,10 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) {
lastPlayedCache = make([]Song, 0, n) lastPlayedCache = make([]Song, 0, n)
if songs, err := icecastLastPlayedSongs(playlistPath, 1); err == nil && len(songs) > 0 {
currentlyPlaying = songs[0]
}
go func() { go func() {
for { for {
select { select {