fix mpv mem leak, waveform gen when double-clicking to play tracks; clean up logs

This commit is contained in:
Drew Weymouth
2025-07-28 18:15:12 -07:00
parent 333b96dd3b
commit 9a1325b92d
4 changed files with 48 additions and 40 deletions
+4 -4
View File
@@ -100,7 +100,7 @@ func (a *AudioCache) cacheFile(id, dlURL string) {
e.done = true
}
a.mutex.Unlock()
} else if err != context.DeadlineExceeded {
} else if err != nil && err != context.DeadlineExceeded {
log.Printf("error downloading audio file: %v", err)
}
cancel() // release ctx resources when done
@@ -120,9 +120,9 @@ func (a *AudioCache) CacheOnly(keep string, fetch []AudioCacheRequest) {
return a.ID == id
}) {
_ = e
//e.cancel()
//_ = os.Remove(a.pathForID(id))
//delete(a.entries, id)
e.cancel()
_ = os.Remove(a.pathForID(id))
delete(a.entries, id)
}
}