Skip to content

🎧 Your Personal Streaming Service

Only try to check cover art file for lastUpdated if fast access is not set

Deluan088af9004a5a
diff --git a/conf/configuration.go b/conf/configuration.go
index 9ad295e08..be584fbc8 100644
--- a/conf/configuration.go
+++ b/conf/configuration.go
@@ -51,7 +51,7 @@ type configOptions struct {
DevLogSourceLine bool
DevAutoCreateAdminPassword string
DevPreCacheAlbumArtwork bool
- DevDisableTrackCoverArt bool
+ DevFastAccessCoverArt bool
DevOldCacheLayout bool
DevActivityMenu bool
}
@@ -142,7 +142,7 @@ func init() {
viper.SetDefault("devautocreateadminpassword", "")
viper.SetDefault("devprecachealbumartwork", false)
viper.SetDefault("devoldcachelayout", false)
- viper.SetDefault("devdisabletrackcoverart", false)
+ viper.SetDefault("devFastAccessCoverArt", false)
viper.SetDefault("devactivitymenu", true)
}
diff --git a/core/artwork.go b/core/artwork.go
index 8d84f87ba..fab4e6723 100644
--- a/core/artwork.go
+++ b/core/artwork.go
@@ -61,8 +61,10 @@ func (a *artwork) Get(ctx context.Context, id string, size int, out io.Writer) e
return err
}
- if stat, err := os.Stat(path); err == nil {
- lastUpdate = stat.ModTime()
+ if !conf.Server.DevFastAccessCoverArt {
+ if stat, err := os.Stat(path); err == nil {
+ lastUpdate = stat.ModTime()
+ }
}
info := &imageInfo{
@@ -115,7 +117,7 @@ func (a *artwork) getImagePath(ctx context.Context, id string) (path string, las
}
// If it is a mediaFile and it has cover art, return it (if feature is disabled, skip)
- if !conf.Server.DevDisableTrackCoverArt && mf.HasCoverArt {
+ if !conf.Server.DevFastAccessCoverArt && mf.HasCoverArt {
return mf.Path, mf.UpdatedAt, nil
}