Forráskód Böngészése

Update cli.py

Bugfix - Multi video files handing
perseron 2 éve
szülő
commit
b862a64ffa
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      auto_subtitle/cli.py

+ 2 - 2
auto_subtitle/cli.py

@@ -82,12 +82,12 @@ def get_audio(paths):
 
 
 def get_subtitles(audio_paths: list, output_srt: bool, output_dir: str, transcribe: callable):
-    srt_path = output_dir if output_srt else tempfile.gettempdir()
     subtitles_path = {}
 
     for path, audio_path in audio_paths.items():
+        srt_path = output_dir if output_srt else tempfile.gettempdir()
         srt_path = os.path.join(srt_path, f"{filename(path)}.srt")
-
+        
         print(
             f"Generating subtitles for {filename(path)}... This might take a while."
         )