mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 22:10:49 +08:00
🎨 Supports via environment var SIYUAN_TESSERACT_ENABLED=false
to close OCR Fix https://github.com/siyuan-note/siyuan/issues/9619
This commit is contained in:
parent
efec2c749e
commit
524776c005
@ -37,8 +37,9 @@ func autoOCRAssets() {
|
||||
util.AssetsTextsLock.Lock()
|
||||
util.AssetsTexts[p] = text
|
||||
util.AssetsTextsLock.Unlock()
|
||||
util.AssetsTextsChanged = true
|
||||
|
||||
if "" != text {
|
||||
util.AssetsTextsChanged = true
|
||||
}
|
||||
if 4 <= i { // 一次任务中最多处理 4 张图片,防止卡顿
|
||||
break
|
||||
}
|
||||
|
@ -69,7 +69,9 @@ func GetAssetText(asset string, force bool) string {
|
||||
AssetsTextsLock.Lock()
|
||||
AssetsTexts[asset] = ret
|
||||
AssetsTextsLock.Unlock()
|
||||
AssetsTextsChanged = true
|
||||
if "" != ret {
|
||||
AssetsTextsChanged = true
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user