Skip to content

Commit

Permalink
Change param to index-blurhash
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyfast committed Mar 15, 2024
1 parent 17edd17 commit 884029b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/vfssrv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 884029b

Please sign in to comment.