mirror of https://github.com/Xhofe/alist
				
				
				
			
		
			
				
	
	
		
			19 lines
		
	
	
		
			327 B
		
	
	
	
		
			Go
		
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			327 B
		
	
	
	
		
			Go
		
	
	
| package bootstrap
 | |
| 
 | |
| import (
 | |
| 	"github.com/alist-org/alist/v3/internal/search"
 | |
| 	log "github.com/sirupsen/logrus"
 | |
| )
 | |
| 
 | |
| func InitIndex() {
 | |
| 	progress, err := search.Progress()
 | |
| 	if err != nil {
 | |
| 		log.Errorf("init index error: %+v", err)
 | |
| 		return
 | |
| 	}
 | |
| 	if !progress.IsDone {
 | |
| 		progress.IsDone = true
 | |
| 		search.WriteProgress(progress)
 | |
| 	}
 | |
| }
 |