瀏覽代碼

add image tst

ming 3 年之前
父節點
當前提交
e58ad637b8
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      OpenshotService/util/parser.py

+ 5 - 4
OpenshotService/util/parser.py

@@ -42,10 +42,11 @@ class parser:
         img_idx = 1 #start from 1
         added_idx = []
         for dic in dict_in:
-            if 'image_obj' in dic and dic['idx'] not in added_idx:
-                added_idx.append(dic['idx'])
-                time_info.append({'index':img_idx,'start':dic['start']})
-                img_idx += 1
+            if 'image_obj' in dic :
+                if dic['idx'] not in added_idx:
+                    added_idx.append(dic['idx'])
+                    time_info.append({'index':img_idx,'start':dic['start']})
+                    img_idx += 1
             stopPoint = dic['start']+dic['duration']
         
         for idx in range(len(time_info)-1):