diff --git a/LunaTranslator/LunaTranslator/ocrengines/baiduocr_X.py b/LunaTranslator/LunaTranslator/ocrengines/baiduocr_X.py index 5e610515..703f1c63 100644 --- a/LunaTranslator/LunaTranslator/ocrengines/baiduocr_X.py +++ b/LunaTranslator/LunaTranslator/ocrengines/baiduocr_X.py @@ -62,7 +62,7 @@ class OCR(baseocr): data = { "image": b64, - "detect_direction": globalconfig["verticalocr"] != 0, + "detect_direction": int(globalconfig["verticalocr"]) != 0, "language_type": self.srclang, } interfacetype = self.config["接口"] diff --git a/LunaTranslator/LunaTranslator/ocrengines/baseocrclass.py b/LunaTranslator/LunaTranslator/ocrengines/baseocrclass.py index 2e398594..ac89faa6 100644 --- a/LunaTranslator/LunaTranslator/ocrengines/baseocrclass.py +++ b/LunaTranslator/LunaTranslator/ocrengines/baseocrclass.py @@ -55,7 +55,7 @@ class baseocr(commonbase): return whs < 1 def common_solve_text_orientation(self, boxs, texts): - vertical = globalconfig["verticalocr"] + vertical = int(globalconfig["verticalocr"]) def norm48(box): return ( diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 4dc4ecd6..9f8f9f38 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 21) -set(VERSION_PATCH 1) +set(VERSION_PATCH 2) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)