diff --git a/conf/configuration.go b/conf/configuration.go index 6566b0915..bfe7296b4 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -50,7 +50,7 @@ type configOptions struct { DevAutoCreateAdminPassword string DevPreCacheAlbumArtwork bool DevDisableTrackCoverArt bool - DevNewCacheLayout bool + DevOldCacheLayout bool } type scannerOptions struct { @@ -136,7 +136,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) } diff --git a/core/cache/file_caches.go b/core/cache/file_caches.go index 0e05d97d4..51fb7bd9b 100644 --- a/core/cache/file_caches.go +++ b/core/cache/file_caches.go @@ -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) }