Bläddra i källkod

add image display test

ming 3 år sedan
förälder
incheckning
72f209c4a6
1 ändrade filer med 2 tillägg och 2 borttagningar
  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)
     img_dict_ls = tp.image_clip_info(sub_dict)
     #if 'image_idx' in dic:
     #if 'image_idx' in dic:
     #            new_dic['image_obj'] = {'start':dic['start'],'idx':dic['image_idx']}
     #            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):
     for p in listdir(dir_photo+name_hash):
         img_list[idx] = openshot.FFmpegReader(dir_photo+name_hash+'/'+p)
         img_list[idx] = openshot.FFmpegReader(dir_photo+name_hash+'/'+p)
         img_list[idx].Open()
         img_list[idx].Open()