diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index 2ad69b9..15bea43 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -24,6 +24,7 @@ const ( var ( lastPlayedCache []Song lastPlayedCacheMutex sync.Mutex + isJustStarted bool = true ) type IcecastStatusDTO struct { @@ -203,6 +204,10 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) { select { case mask := <-pw.changed: if mask&syscall.IN_MODIFY > 0 { + if isJustStarted { + isJustStarted = false + break + } lastPlayedCacheMutex.Lock() if lastPlayedCache == nil { lastPlayedCache = make([]Song, n)