фикс func video_size

This commit is contained in:
Viner Abubakirov
2026-02-25 12:18:46 +05:00
parent dc5f07fd78
commit 9f5c27df8c
2 changed files with 2 additions and 3 deletions

View File

@@ -18,5 +18,5 @@ async def video_resolutions(url: str):
return {"resolutions": YouTubeService.resolutions(url)}
@router.get("/size")
async def video_size(data: DownloadRequest):
async def video_size(data: DownloadRequest) -> dict[str, int]:
return {"size": YouTubeService.filesize(data)}

View File

@@ -46,8 +46,7 @@ class YouTubeService:
manager = YtDlpManager((data.url))
video_size = manager.best_video(data.quality).filesize
audio_size = manager.best_audio().filesize
return {"filesize": video_size + audio_size}
return video_size + audio_size
class Files:
@staticmethod