Parcourir la source

add image display test

ming il y a 3 ans
Parent
commit
72f209c4a6
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      OpenshotService/openshot_video_generator.py

+ 2 - 2
OpenshotService/openshot_video_generator.py

@@ -652,8 +652,8 @@ def video_gen(name_hash,name,text_content, image_urls,multiLang,avatar):
     img_dict_ls = tp.image_clip_info(sub_dict)
     #if 'image_idx' in dic:
     #            new_dic['image_obj'] = {'start':dic['start'],'idx':dic['image_idx']}
-    img_clip_list = [None]*len(text_content)
-    img_list = [None]*len(text_content)
+    img_clip_list = [None]*len(listdir(dir_photo+name_hash))
+    img_list = [None]*len(img_clip_list)
     for p in listdir(dir_photo+name_hash):
         img_list[idx] = openshot.FFmpegReader(dir_photo+name_hash+'/'+p)
         img_list[idx].Open()