Chrunos commited on
Commit
db90955
·
verified ·
1 Parent(s): 4c9b656

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -525,7 +525,7 @@ async def multi_download(request: Request):
525
  help_url = "https://chrunos.com/premium-shortcuts/" # Replace with your actual URL
526
  return {"error": error_message, "url": help_url}
527
 
528
- '''
529
  is_youtube_url = re.search(r'(youtube\.com|youtu\.be)', video_url) is not None
530
 
531
  if is_youtube_url:
@@ -539,16 +539,15 @@ async def multi_download(request: Request):
539
  }
540
 
541
  else:
542
- '''
543
- dl_url = await get_track_download_url(video_url, quality)
544
- if dl_url:
545
- remaining_requests_value = rate_limiter.max_requests - rate_limiter.get_current_count(user_ip)
546
- dl_url["requests_remaining"] = remaining_requests_value
547
- return dl_url
548
- else:
549
- return {
550
- "error": "Failed to Fetch the video."
551
- }
552
 
553
 
554
 
 
525
  help_url = "https://chrunos.com/premium-shortcuts/" # Replace with your actual URL
526
  return {"error": error_message, "url": help_url}
527
 
528
+
529
  is_youtube_url = re.search(r'(youtube\.com|youtu\.be)', video_url) is not None
530
 
531
  if is_youtube_url:
 
539
  }
540
 
541
  else:
542
+ dl_url = await get_track_download_url(video_url, quality)
543
+ if dl_url:
544
+ remaining_requests_value = rate_limiter.max_requests - rate_limiter.get_current_count(user_ip)
545
+ dl_url["requests_remaining"] = remaining_requests_value
546
+ return dl_url
547
+ else:
548
+ return {
549
+ "error": "Failed to Fetch the video."
550
+ }
 
551
 
552
 
553