mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-24 07:30:57 +03:00
Don't show warning about image cache disabled if pre-cache warmer is disabled
This commit is contained in:
parent
f2a8308925
commit
0aaa261a71
@ -57,9 +57,9 @@ func (w *warmer) waitForCacheReady(ctx context.Context) {
|
||||
}
|
||||
|
||||
func (w *warmer) Flush(ctx context.Context) {
|
||||
w.waitForCacheReady(ctx)
|
||||
if w.artworkCache.Available(ctx) {
|
||||
if conf.Server.DevPreCacheAlbumArtwork {
|
||||
if conf.Server.DevPreCacheAlbumArtwork {
|
||||
w.waitForCacheReady(ctx)
|
||||
if w.artworkCache.Available(ctx) {
|
||||
if w.pool == nil || len(w.albums) == 0 {
|
||||
return
|
||||
}
|
||||
@ -67,9 +67,9 @@ func (w *warmer) Flush(ctx context.Context) {
|
||||
for id := range w.albums {
|
||||
w.pool.Submit(artworkItem{albumID: id})
|
||||
}
|
||||
} else {
|
||||
log.Warn(ctx, "Cache warmer is not available as ImageCache is DISABLED")
|
||||
}
|
||||
} else {
|
||||
log.Warn(ctx, "Pre-cache warmer is not available as ImageCache is DISABLED")
|
||||
}
|
||||
w.albums = map[string]struct{}{}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user