YTShortMakerArchx commited on
Commit
a0062ef
·
verified ·
1 Parent(s): 8bb327c

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +11 -1
main.py CHANGED
@@ -577,7 +577,17 @@ async def process_video_task(
577
  message="Downloading background video...", queue_position=None)
578
 
579
  try:
580
- bg_path = await download_video_from_dataset(background, "minecraft")
 
 
 
 
 
 
 
 
 
 
581
  except HTTPException as e:
582
  update_job(job_id, status="failed", error=str(e.detail))
583
  return
 
577
  message="Downloading background video...", queue_position=None)
578
 
579
  try:
580
+ # Auto-detect category from video name
581
+ # ss1, ss2, ss3, ss4, ss5 → subwaysurfers
582
+ # mc1, mc2, etc. → minecraft
583
+ if background.startswith('ss'):
584
+ category = 'subwaysurfers'
585
+ elif background.startswith('mc'):
586
+ category = 'minecraft'
587
+ else:
588
+ category = 'minecraft' # default fallback
589
+
590
+ bg_path = await download_video_from_dataset(background, category)
591
  except HTTPException as e:
592
  update_job(job_id, status="failed", error=str(e.detail))
593
  return