Selaa lähdekoodia

兼容单视频id

zhangyong 11 kuukautta sitten
vanhempi
commit
0af54f04b6
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      video_agc/agc_video_method.py

+ 5 - 1
video_agc/agc_video_method.py

@@ -686,7 +686,11 @@ class AgcVidoe():
             try:
             try:
                 uid = data['uid']  # 音频id
                 uid = data['uid']  # 音频id
                 srt = data['text']  # srt
                 srt = data['text']  # srt
-                videos = data['video'].split(',')
+                videos = data['video']
+                if ',' in videos:
+                    videos = videos.split(',')
+                else:
+                    videos = [videos]
                 if srt:
                 if srt:
                     # 创建临时字幕文件
                     # 创建临时字幕文件
                     cls.create_subtitle_file(srt, s_path)
                     cls.create_subtitle_file(srt, s_path)