mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
Make new cache layout the default
This commit is contained in:
parent
e92b02c4cc
commit
a9e239a698
@ -51,7 +51,7 @@ type configOptions struct {
|
||||
DevAutoCreateAdminPassword string
|
||||
DevPreCacheAlbumArtwork bool
|
||||
DevDisableTrackCoverArt bool
|
||||
DevNewCacheLayout bool
|
||||
DevOldCacheLayout bool
|
||||
}
|
||||
|
||||
type scannerOptions struct {
|
||||
@ -155,7 +155,7 @@ func init() {
|
||||
viper.SetDefault("devlogsourceline", false)
|
||||
viper.SetDefault("devautocreateadminpassword", "")
|
||||
viper.SetDefault("devprecachealbumartwork", false)
|
||||
viper.SetDefault("devnewcachelayout", false)
|
||||
viper.SetDefault("devoldcachelayout", false)
|
||||
viper.SetDefault("devdisabletrackcoverart", false)
|
||||
}
|
||||
|
||||
|
||||
8
core/cache/file_caches.go
vendored
8
core/cache/file_caches.go
vendored
@ -191,10 +191,10 @@ func newFSCache(name, cacheSize, cacheFolder string, maxItems int) (fscache.Cach
|
||||
|
||||
var fs fscache.FileSystem
|
||||
log.Info(fmt.Sprintf("Creating %s cache", name), "path", cacheFolder, "maxSize", humanize.Bytes(size))
|
||||
if conf.Server.DevNewCacheLayout {
|
||||
fs, err = NewSpreadFS(cacheFolder, 0755)
|
||||
} else {
|
||||
if conf.Server.DevOldCacheLayout {
|
||||
fs, err = fscache.NewFs(cacheFolder, 0755)
|
||||
} else {
|
||||
fs, err = NewSpreadFS(cacheFolder, 0755)
|
||||
}
|
||||
if err != nil {
|
||||
log.Error(fmt.Sprintf("Error initializing %s cache", name), err)
|
||||
@ -206,7 +206,7 @@ func newFSCache(name, cacheSize, cacheFolder string, maxItems int) (fscache.Cach
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if conf.Server.DevNewCacheLayout {
|
||||
if !conf.Server.DevOldCacheLayout {
|
||||
ck.SetKeyMapper(fs.(*spreadFS).KeyMapper)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user