diff --git a/backend/app/routes/download.py b/backend/app/routes/download.py index ca53d9a..6c1d557 100644 --- a/backend/app/routes/download.py +++ b/backend/app/routes/download.py @@ -121,7 +121,8 @@ async def _do_download(task_id: str, url: str, format_id: str): await db.commit() register_task(task_id) - result = download_video(url, format_id, task_id=task_id) + import asyncio + result = await asyncio.to_thread(download_video, url, format_id, None, task_id) video.title = result["title"] video.thumbnail = result["thumbnail"]