From 884029b52f770bbc106fc3ae7158fb694667f359 Mon Sep 17 00:00:00 2001 From: Sergey Bykov Date: Fri, 15 Mar 2024 12:03:22 +0300 Subject: [PATCH] Change param to `index-blurhash` --- cmd/vfssrv/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/vfssrv/main.go b/cmd/vfssrv/main.go index c1160b2..2d83b94 100644 --- a/cmd/vfssrv/main.go +++ b/cmd/vfssrv/main.go @@ -37,7 +37,7 @@ var ( flFileSize = fs.Int64("maxsize", 32<<20, "max file size in bytes") flVerboseSQL = fs.Bool("verbose-sql", false, "log all sql queries") flIndex = fs.Bool("index", false, "index files on start: width, height, blurhash") - flIndexDisableBH = fs.Bool("index-disable-blurhash", false, "do not calculate blurhash") + flIndexBlurhash = fs.Bool("index-blurhash", true, "calculate blurhash (could be long operation on large files)") flIndexWorkers = fs.Int("index-workers", runtime.NumCPU()/2, "total running indexer workers, default is cores/2") flIndexBatchSize = fs.Uint64("index-batch-size", 64, "indexer batch size for files, default is 64") version string @@ -84,7 +84,7 @@ func main() { http.Handle(*flWebPath, http.StripPrefix(*flWebPath, http.FileServer(http.Dir(*flDir)))) if flIndex != nil && *flIndex { - hi := vfs.NewHashIndexer(db.DB{DB: dbc}, repo, v, *flIndexWorkers, *flIndexBatchSize, !*flIndexDisableBH) + hi := vfs.NewHashIndexer(db.DB{DB: dbc}, repo, v, *flIndexWorkers, *flIndexBatchSize, *flIndexBlurhash) http.Handle("/scan-files", http.HandlerFunc(hi.ScanFilesHandler)) http.Handle("/preview/", corsMiddleware(hi.Preview())) go hi.Start()