🎨 导入 .sy.zip 时增量建立索引 https://github.com/siyuan-note/siyuan/issues/7123

This commit is contained in:
Liang Ding 2023-01-19 17:13:27 +08:00
parent 7401ae845a
commit 772984fe1b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 51 additions and 6 deletions

View file

@ -93,8 +93,7 @@ func getUnOCRAssetsAbsPaths() (ret []string) {
var assetsPaths []string
assets := cache.GetAssets()
for _, asset := range assets {
lowerName := strings.ToLower(asset.Path)
if !strings.HasSuffix(lowerName, ".png") && !strings.HasSuffix(lowerName, ".jpg") && !strings.HasSuffix(lowerName, ".jpeg") {
if !util.IsTesseractExtractable(asset.Path) {
continue
}
assetsPaths = append(assetsPaths, asset.Path)