mirror of
https://github.com/Dasemu/Transcriptarr.git
synced 2026-11-27 15:36:08 +00:00
Update subgen.py
This commit is contained in:
1 parent
44eb52b62b
commit
82fb0126f8
1 file changed
+2
-2
+2
-2
@@ -91,7 +91,7 @@ def gen_subtitles(inputvideo):
|
||||
try:
|
||||
print(f"Transcribing file: {inputvideo}")
|
||||
result = model.transcribe_stable(inputvideo)
|
||||
result.to_srt_vtt(inputvideo + subextension, word_level=word_level_highlight)
|
||||
result.to_srt_vtt(inputvideo.rsplit('.', 1)[0] + ' ' + subextension, word_level=word_level_highlight)
|
||||
print(f"Transcription of {file_path} is completed.")
|
||||
files_to_transcribe.remove(inputvideo)
|
||||
except Exception as e:
|
||||
@@ -104,7 +104,7 @@ def add_file_for_transcription(file_path):
|
||||
if has_subtitle_language(file_path, skipifinternalsublang):
|
||||
print("File already has an internal sub we want, skipping generation")
|
||||
return "File already has an internal sub we want, skipping generation"
|
||||
elif os.path.exists(file_path + subextension):
|
||||
elif os.path.exists(file_path.rsplit('.', 1)[0] + ' ' + subextension):
|
||||
print("We already have a subgen created for this file, skipping it")
|
||||
return "We already have a subgen created for this file, skipping it"
|
||||
|
||||
|
||||
Reference in new issue
Block a user