diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index ded957a..26ef7a7 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -128,7 +128,7 @@ func lastPlayedSongs(lastNSongs int, playlistPath string) ([]Song, error) { } var playlistWatcher watcher.InotifyWatcher -var playlistFired chan uint32 +var playlistFired chan uint32 = make(chan uint32) var lastPlayedCache []Song var lastPlayedCacheMutex sync.Mutex @@ -143,8 +143,6 @@ func IcecastWatchPlaylist(playlistPath string, lastNSongs int) error { return errors.Wrap(err, "cannot set a playlist to watch") } - playlistFired = make(chan uint32) - playlistWatcher.WatchForMask(playlistFired, watcher.ModMask) go func() {