1
0

Only then call make on cache if it is nil.

This commit is contained in:
Alexander Andreev 2023-08-20 03:20:49 +04:00
parent e402829724
commit 7df94bef12
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -183,7 +183,9 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) {
pw.watcher.WatchForMask(pw.changed, watcher.ModIgnMask)
if lastPlayedCache == nil {
lastPlayedCache = make([]Song, 0, n)
}
go func() {
for {