mirror of
https://github.com/ReviveMii/revivetube
synced 2025-04-29 12:39:25 -04:00
Update helper.py
This commit is contained in:
parent
630cbae7b0
commit
b873c7fcc7
1 changed files with 2 additions and 1 deletions
|
@ -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)}")
|
||||
|
|
Loading…
Add table
Reference in a new issue