Krokodilpirat commited on
Commit
d161e47
·
verified ·
1 Parent(s): 41131e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -486,11 +486,16 @@ def on_video_url_change(url, use_blip):
486
  global current_video_file, current_video_url, blip_generated_name, original_filename
487
 
488
  if not url or url.strip() == "":
489
- current_video_file = None
490
- current_video_url = None
491
- blip_generated_name = ""
492
- original_filename = ""
493
- return None, "", "Enter a video URL (MidJourney or Civitai supported)"
 
 
 
 
 
494
 
495
  try:
496
  source = detect_video_source(url)
 
486
  global current_video_file, current_video_url, blip_generated_name, original_filename
487
 
488
  if not url or url.strip() == "":
489
+ # WICHTIG: Nur State löschen wenn wir kein Upload-Video haben!
490
+ # Sonst würde Upload → URL clear → Video verschwinden
491
+ if current_video_file is None:
492
+ current_video_url = None
493
+ blip_generated_name = ""
494
+ original_filename = ""
495
+ return None, "", "Enter a video URL (MidJourney or Civitai supported)"
496
+ else:
497
+ # Upload-Video ist aktiv, URL wurde nur geleert - nichts ändern
498
+ return gr.update(), gr.update(), gr.update()
499
 
500
  try:
501
  source = detect_video_source(url)