From 05548d20ac16c89def3e48b6a11bc1a8a74fe789 Mon Sep 17 00:00:00 2001 From: SWHL Date: Tue, 15 Oct 2024 08:15:46 +0800 Subject: [PATCH] fix: Fixed issue #67 --- .gitignore | 1 + rapid_videocr/main.py | 2 ++ rapid_videocr/rapid_videocr.py | 2 +- rapid_videocr/video_sub_finder.py | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 12693f4..fa2ba2a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ rapid_videocr/video_sub_finder/libs *.vscode +outputs *.pyc diff --git a/rapid_videocr/main.py b/rapid_videocr/main.py index c0486e7..3a394b0 100644 --- a/rapid_videocr/main.py +++ b/rapid_videocr/main.py @@ -44,6 +44,7 @@ def __init__( general_settings: Optional[str] = None, num_threads: int = -1, num_ocr_threads: int = 1, + **kwargs, ) -> None: self.vsf = VideoSubFinder( vsf_exe_path, @@ -72,6 +73,7 @@ def __init__( concat_batch=concat_batch, out_format=out_format, is_print_console=is_print_console, + **kwargs, ) self.video_formats = [".mp4", ".avi", ".mov", ".mkv"] diff --git a/rapid_videocr/rapid_videocr.py b/rapid_videocr/rapid_videocr.py index c608791..9b9bbd6 100644 --- a/rapid_videocr/rapid_videocr.py +++ b/rapid_videocr/rapid_videocr.py @@ -50,7 +50,7 @@ def __call__( video_sub_finder_dir: Union[str, Path], save_dir: Union[str, Path], save_name: str = "result", - ) -> None: + ): """call Args: diff --git a/rapid_videocr/video_sub_finder.py b/rapid_videocr/video_sub_finder.py index bd5e9ae..b3d060a 100644 --- a/rapid_videocr/video_sub_finder.py +++ b/rapid_videocr/video_sub_finder.py @@ -30,7 +30,7 @@ def __init__( general_settings: Optional[str] = None, num_threads: int = 2, num_ocr_threads: int = 1, - ) -> None: + ): self.exe_path = vsf_exe_path if self.exe_path is None: raise ValueError("VSF Exe path must not be None.")