mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01: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
2 changed files with 6 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue