🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Add option to disable Cache Warmer. Related to #2142
Deluanee8f6447eb4d
diff --git a/conf/configuration.go b/conf/configuration.goindex ee41432c0..7471af811 100644--- a/conf/configuration.go+++ b/conf/configuration.go@@ -37,6 +37,7 @@ type configOptions struct {EnableMediaFileCoverArt boolTranscodingCacheSize stringImageCacheSize string+ EnableArtworkPrecache boolAutoImportPlaylists boolPlaylistsPath stringAutoTranscodeDownload bool@@ -232,6 +233,7 @@ func init() {viper.SetDefault("enabletranscodingconfig", false)viper.SetDefault("transcodingcachesize", "100MB")viper.SetDefault("imagecachesize", "100MB")+ viper.SetDefault("enableartworkprecache", true)viper.SetDefault("autoimportplaylists", true)viper.SetDefault("playlistspath", consts.DefaultPlaylistsPath)viper.SetDefault("enabledownloads", true)diff --git a/core/artwork/cache_warmer.go b/core/artwork/cache_warmer.goindex eeb426a03..eed935e9f 100644--- a/core/artwork/cache_warmer.go+++ b/core/artwork/cache_warmer.go@@ -23,7 +23,7 @@ type CacheWarmer interface {func NewCacheWarmer(artwork Artwork, cache cache.FileCache) CacheWarmer {// If image cache is disabled, return a NOOP implementation- if conf.Server.ImageCacheSize == "0" {+ if conf.Server.ImageCacheSize == "0" || !conf.Server.EnableArtworkPrecache {return &noopCacheWarmer{}}