Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,5 @@ config.backup.yaml
# runtime
runtime/
dev/
installer_files/
installer_files/
config.yaml
File renamed without changes.
5 changes: 5 additions & 0 deletions core/_5_split_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ def valid_align(response_data):
align_data = parsed['align']
src_parts = src_part.split('\n')
tr_parts = [item[f'target_part_{i+1}'].strip() for i, item in enumerate(align_data)]

# bugfix: if the src_parts and tr_parts have different lengths, merge them into one part
if len(src_parts) != len(tr_parts):
src_parts = ["\n".join(src_parts)]
tr_parts = ["\n".join(tr_parts)]

whisper_language = load_key("whisper.language")
language = load_key("whisper.detected_language") if whisper_language == 'auto' else whisper_language
Expand Down
5 changes: 5 additions & 0 deletions install.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os, sys
import platform
import subprocess
import shutil
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

ascii_logo = """
Expand Down Expand Up @@ -87,6 +88,10 @@ def main():
from core.utils.decorator import except_handler

console = Console()

# copy defaule config.yaml to config.yaml
if not os.path.exists("config.yaml"):
shutil.copy("config.yaml.example", "config.yaml")

width = max(len(line) for line in ascii_logo.splitlines()) + 4
welcome_panel = Panel(
Expand Down