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字幕文件
         subtitle_file = f"./video_stitching/video/{srt}.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:
                 subtitles = file.read().strip().split('\n\n')
             # 从SRT字幕文件中获取字幕