tomoya 2 semanas atrás
pai
commit
461f94d670
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1 2
      backend/app/app/core/video_utils.py

+ 1 - 2
backend/app/app/core/video_utils.py

@@ -71,7 +71,7 @@ def check_zip(zip_filepath:str):
           raise ValueError(f"voice file is can't find is zip at scene {i+1}.")
       
 def update_zip(zip_path, lang, new_filename, voice):
-    temp_zip_path = zip_path + ".tmp"
+
 
     with zipfile.ZipFile(zip_path, 'r') as zip_in, zipfile.ZipFile(new_filename, 'w') as zip_out:
         for item in zip_in.infolist():
@@ -101,7 +101,6 @@ def update_zip(zip_path, lang, new_filename, voice):
 
     # 旧ZIPを削除し、新ZIPをリネーム
     os.remove(zip_path)
-    os.rename(temp_zip_path, new_filename)
     
 def translate_table(table, lang):
     translator= Translator(to_lang=lang)