mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
Remove old feature flag for cache layout
This commit is contained in:
parent
5f9c7d1507
commit
f0d5ed2104
@ -68,7 +68,6 @@ type configOptions struct {
|
|||||||
DevAutoLoginUsername string
|
DevAutoLoginUsername string
|
||||||
DevPreCacheAlbumArtwork bool
|
DevPreCacheAlbumArtwork bool
|
||||||
DevFastAccessCoverArt bool
|
DevFastAccessCoverArt bool
|
||||||
DevOldCacheLayout bool
|
|
||||||
DevActivityPanel bool
|
DevActivityPanel bool
|
||||||
DevEnableShare bool
|
DevEnableShare bool
|
||||||
DevEnableBufferedScrobble bool
|
DevEnableBufferedScrobble bool
|
||||||
@ -245,7 +244,6 @@ func init() {
|
|||||||
viper.SetDefault("devautocreateadminpassword", "")
|
viper.SetDefault("devautocreateadminpassword", "")
|
||||||
viper.SetDefault("devautologinusername", "")
|
viper.SetDefault("devautologinusername", "")
|
||||||
viper.SetDefault("devprecachealbumartwork", false)
|
viper.SetDefault("devprecachealbumartwork", false)
|
||||||
viper.SetDefault("devoldcachelayout", false)
|
|
||||||
viper.SetDefault("devfastaccesscoverart", false)
|
viper.SetDefault("devfastaccesscoverart", false)
|
||||||
viper.SetDefault("devactivitypanel", true)
|
viper.SetDefault("devactivitypanel", true)
|
||||||
viper.SetDefault("devenableshare", false)
|
viper.SetDefault("devenableshare", false)
|
||||||
|
|||||||
9
utils/cache/file_caches.go
vendored
9
utils/cache/file_caches.go
vendored
@ -197,13 +197,9 @@ func newFSCache(name, cacheSize, cacheFolder string, maxItems int) (fscache.Cach
|
|||||||
|
|
||||||
var fs fscache.FileSystem
|
var fs fscache.FileSystem
|
||||||
log.Info(fmt.Sprintf("Creating %s cache", name), "path", cacheFolder, "maxSize", humanize.Bytes(size))
|
log.Info(fmt.Sprintf("Creating %s cache", name), "path", cacheFolder, "maxSize", humanize.Bytes(size))
|
||||||
if conf.Server.DevOldCacheLayout {
|
|
||||||
fs, err = fscache.NewFs(cacheFolder, 0755)
|
|
||||||
} else {
|
|
||||||
fs, err = NewSpreadFS(cacheFolder, 0755)
|
fs, err = NewSpreadFS(cacheFolder, 0755)
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(fmt.Sprintf("Error initializing %s cache FS", name), "newLayout", !conf.Server.DevOldCacheLayout, err)
|
log.Error(fmt.Sprintf("Error initializing %s cache FS", name), err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,10 +208,7 @@ func newFSCache(name, cacheSize, cacheFolder string, maxItems int) (fscache.Cach
|
|||||||
log.Error(fmt.Sprintf("Error initializing %s cache", name), err)
|
log.Error(fmt.Sprintf("Error initializing %s cache", name), err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !conf.Server.DevOldCacheLayout {
|
|
||||||
ck.SetKeyMapper(fs.(*spreadFS).KeyMapper)
|
ck.SetKeyMapper(fs.(*spreadFS).KeyMapper)
|
||||||
}
|
|
||||||
|
|
||||||
return ck, nil
|
return ck, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user