zhangyong 1 年之前
父節點
當前提交
7813da8fb7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      video_stitching/video_stitching.py

+ 1 - 1
video_stitching/video_stitching.py

@@ -184,7 +184,7 @@ class VideoStitching():
         # 处理SRT字幕文件
         # 处理SRT字幕文件
         subtitle_file = f"./video_stitching/video/{srt}.srt"
         subtitle_file = f"./video_stitching/video/{srt}.srt"
         Common.logger().info(f"处理SRT字幕文件")
         Common.logger().info(f"处理SRT字幕文件")
-        if os.path.isfile(subtitle_file):
+        if os.path.exists(subtitle_file):
             with open(subtitle_file, 'r') as file:
             with open(subtitle_file, 'r') as file:
                 subtitles = file.read().strip().split('\n\n')
                 subtitles = file.read().strip().split('\n\n')
             # 从SRT字幕文件中获取字幕
             # 从SRT字幕文件中获取字幕