mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-17 23:51:48 +03:00
Only try to check cover art file for lastUpdated if fast access is not set
This commit is contained in:
parent
1ee39835dd
commit
088af9004a
@ -51,7 +51,7 @@ type configOptions struct {
|
|||||||
DevLogSourceLine bool
|
DevLogSourceLine bool
|
||||||
DevAutoCreateAdminPassword string
|
DevAutoCreateAdminPassword string
|
||||||
DevPreCacheAlbumArtwork bool
|
DevPreCacheAlbumArtwork bool
|
||||||
DevDisableTrackCoverArt bool
|
DevFastAccessCoverArt bool
|
||||||
DevOldCacheLayout bool
|
DevOldCacheLayout bool
|
||||||
DevActivityMenu bool
|
DevActivityMenu bool
|
||||||
}
|
}
|
||||||
@ -142,7 +142,7 @@ func init() {
|
|||||||
viper.SetDefault("devautocreateadminpassword", "")
|
viper.SetDefault("devautocreateadminpassword", "")
|
||||||
viper.SetDefault("devprecachealbumartwork", false)
|
viper.SetDefault("devprecachealbumartwork", false)
|
||||||
viper.SetDefault("devoldcachelayout", false)
|
viper.SetDefault("devoldcachelayout", false)
|
||||||
viper.SetDefault("devdisabletrackcoverart", false)
|
viper.SetDefault("devFastAccessCoverArt", false)
|
||||||
viper.SetDefault("devactivitymenu", true)
|
viper.SetDefault("devactivitymenu", true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,8 +61,10 @@ func (a *artwork) Get(ctx context.Context, id string, size int, out io.Writer) e
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if stat, err := os.Stat(path); err == nil {
|
if !conf.Server.DevFastAccessCoverArt {
|
||||||
lastUpdate = stat.ModTime()
|
if stat, err := os.Stat(path); err == nil {
|
||||||
|
lastUpdate = stat.ModTime()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
info := &imageInfo{
|
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 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
|
return mf.Path, mf.UpdatedAt, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user