From 474311792788f416f99a258360097c757d819c30 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Sun, 8 Dec 2024 16:32:52 +0600 Subject: [PATCH] update ffmpeg_s.py --- bot/helper/aeon_utils/ffmpeg_s.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bot/helper/aeon_utils/ffmpeg_s.py b/bot/helper/aeon_utils/ffmpeg_s.py index b21e0e65e..65c68d92a 100644 --- a/bot/helper/aeon_utils/ffmpeg_s.py +++ b/bot/helper/aeon_utils/ffmpeg_s.py @@ -81,11 +81,11 @@ async def readlines(self, stream): async def progress(self, status: str = ""): start_time = time() - async for line in self.readlines(self.listener.suproc.stderr): + async for line in self.readlines(self.listener.subproc.stderr): if ( self.is_cancel - or self.listener.suproc == "cancelled" - or self.listener.suproc.returncode is not None + or self.listener.subproc == "cancelled" + or self.listener.subproc.returncode is not None ): return if status == "direct": @@ -174,15 +174,15 @@ async def create(self, video_file: str, on_file: bool = False): self.outfile, ] - if self.listener.suproc == "cancelled": + if self.listener.subproc == "cancelled": return False self.name, self.size = ( ospath.basename(video_file), await get_path_size(video_file), ) - self.listener.suproc = await create_subprocess_exec(*cmd, stderr=PIPE) - _, code = await gather(self.progress(), self.listener.suproc.wait()) + self.listener.subproc = await create_subprocess_exec(*cmd, stderr=PIPE) + _, code = await gather(self.progress(), self.listener.subproc.wait()) if code == -9: return False @@ -199,7 +199,7 @@ async def create(self, video_file: str, on_file: bool = False): LOGGER.error( "%s. Something went wrong while creating sample video, mostly file is corrupted. Path: %s", - (await self.listener.suproc.stderr.read()).decode().strip(), + (await self.listener.subproc.stderr.read()).decode().strip(), video_file, ) return video_file