mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +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.AssetsTextsLock.Lock()
|
||||||
util.AssetsTexts[p] = text
|
util.AssetsTexts[p] = text
|
||||||
util.AssetsTextsLock.Unlock()
|
util.AssetsTextsLock.Unlock()
|
||||||
util.AssetsTextsChanged = true
|
if "" != text {
|
||||||
|
util.AssetsTextsChanged = true
|
||||||
|
}
|
||||||
if 4 <= i { // 一次任务中最多处理 4 张图片,防止卡顿
|
if 4 <= i { // 一次任务中最多处理 4 张图片,防止卡顿
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,9 @@ func GetAssetText(asset string, force bool) string {
|
||||||
AssetsTextsLock.Lock()
|
AssetsTextsLock.Lock()
|
||||||
AssetsTexts[asset] = ret
|
AssetsTexts[asset] = ret
|
||||||
AssetsTextsLock.Unlock()
|
AssetsTextsLock.Unlock()
|
||||||
AssetsTextsChanged = true
|
if "" != ret {
|
||||||
|
AssetsTextsChanged = true
|
||||||
|
}
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue