ming 3 gadi atpakaļ
vecāks
revīzija
88c7ebc479
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      OpenshotService/util/parser.py

+ 3 - 1
OpenshotService/util/parser.py

@@ -40,8 +40,10 @@ class parser:
         stopPoint = 0 # sec
         time_info = []
         img_idx = 1 #start from 1
+        added_idx = []
         for dic in dict_in:
-            if 'image_obj' in dic:
+            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
             stopPoint = dic['start']+dic['duration']