From 09137ad784894f46424c98dc114414d7e60b1eb4 Mon Sep 17 00:00:00 2001 From: AuroraWright Date: Thu, 3 Jul 2025 02:17:36 +0200 Subject: [PATCH] Fix https://github.com/AuroraWright/owocr/issues/24 and https://github.com/AuroraWright/owocr/issues/21 --- owocr/run.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/owocr/run.py b/owocr/run.py index 7573d98..b92db0c 100644 --- a/owocr/run.py +++ b/owocr/run.py @@ -199,7 +199,7 @@ class DirectoryWatcher(threading.Thread): old_paths = set() for path in self.path.iterdir(): if path.suffix.lower() in self.allowed_extensions: - old_paths.add(get_path_key(path)) + old_paths.add(self.get_path_key(path)) while not terminated: if paused: @@ -357,7 +357,7 @@ class TextFiltering: break else: for block in new_blocks: - if self.classify(block)[0] == 'ja': + if self.classify(block)[0] in ('ja', 'zh'): final_blocks.append(block) text = '\n'.join(final_blocks) diff --git a/pyproject.toml b/pyproject.toml index 396f265..e0a952f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "owocr" -version = "1.14.2" +version = "1.14.3" description = "Japanese OCR" readme = "README.md" requires-python = ">=3.11"