From b873c7fcc715ffb7bddf203b973f142114b4df52 Mon Sep 17 00:00:00 2001 From: TheErrorExe <161362055+TheErrorExe@users.noreply.github.com> Date: Tue, 1 Apr 2025 21:38:18 +0200 Subject: [PATCH] Update helper.py --- helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helper.py b/helper.py index af27c49..7aa7559 100644 --- a/helper.py +++ b/helper.py @@ -3,6 +3,7 @@ import os import subprocess import aiofiles import aiohttp +import asyncio async def read_file(path): assert isinstance(path, str), "Path must be a string" @@ -43,7 +44,7 @@ async def format_duration(seconds): async def get_file_size(file_path): try: - stat = os.stat(file_path) + stat = await aiofiles.os.stat(file_path) return stat.st_size except Exception as e: print(f"Error getting file size: {str(e)}")