ishworrsubedii commited on
Commit
e326181
·
1 Parent(s): bde86eb

fix: cto image duplicate issue

Browse files
src/components/each_necklace_video_gen.py CHANGED
@@ -22,7 +22,8 @@ class EachVideoCreator:
22
  nto_cto_outputs=None, makeup_outputs=None, font_path=None, output_path=None,
23
  audio_path=None, image_display_duration=2.5, box_color=(131, 42, 48), box_opacity=0.8,
24
  font_size=28, text_color="white", fps=1, outro_title=None, logo_image=None, address=None,
25
- phone_numbers=None, transition_duration=0.5, transition_type='crossfade', direction='left',outro_video_path: str = ""):
 
26
  self.intro_video_path = intro_video_path
27
  self.necklace_images = necklace_image if necklace_image else []
28
  self.nto_outputs = nto_outputs if nto_outputs else []
@@ -172,16 +173,17 @@ class EachVideoCreator:
172
  nto_clips = self.create_grouped_clips([self.nto_outputs[idx]], self.nto_title[idx][idj])
173
  if nto_clips:
174
  clips.extend(nto_clips)
175
-
176
  if idx < len(self.nto_cto_outputs):
 
177
  for idj in range(len(self.nto_cto_outputs[idx])):
178
  print(f"Total CTO outputs{len(self.nto_cto_outputs)}")
179
  print(f"Adding CTO outputs for Necklace {idx + 1}")
180
  cto_clips = self.create_grouped_clips([self.nto_cto_outputs[idx]], self.cto_title[idx][idj])
181
- if cto_clips:
182
- clips.extend(cto_clips)
183
- else:
184
- print(f"No valid CTO clips for Necklace {idx + 1}")
 
185
 
186
  if idx < len(self.makeup_outputs):
187
  for idj in range(len(self.makeup_outputs[idx])):
 
22
  nto_cto_outputs=None, makeup_outputs=None, font_path=None, output_path=None,
23
  audio_path=None, image_display_duration=2.5, box_color=(131, 42, 48), box_opacity=0.8,
24
  font_size=28, text_color="white", fps=1, outro_title=None, logo_image=None, address=None,
25
+ phone_numbers=None, transition_duration=0.5, transition_type='None', direction='left',
26
+ outro_video_path: str = ""):
27
  self.intro_video_path = intro_video_path
28
  self.necklace_images = necklace_image if necklace_image else []
29
  self.nto_outputs = nto_outputs if nto_outputs else []
 
173
  nto_clips = self.create_grouped_clips([self.nto_outputs[idx]], self.nto_title[idx][idj])
174
  if nto_clips:
175
  clips.extend(nto_clips)
 
176
  if idx < len(self.nto_cto_outputs):
177
+
178
  for idj in range(len(self.nto_cto_outputs[idx])):
179
  print(f"Total CTO outputs{len(self.nto_cto_outputs)}")
180
  print(f"Adding CTO outputs for Necklace {idx + 1}")
181
  cto_clips = self.create_grouped_clips([self.nto_cto_outputs[idx]], self.cto_title[idx][idj])
182
+
183
+ if cto_clips:
184
+ clips.extend(cto_clips)
185
+ else:
186
+ print(f"No valid CTO clips for Necklace {idx + 1}")
187
 
188
  if idx < len(self.makeup_outputs):
189
  for idj in range(len(self.makeup_outputs[idx])):