Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Jan 1, 2025
1 parent 02a00fa commit 1a4aecd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bot/helper/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,10 @@ async def process_directory(directory, key):
if self.isCancelled:
cpu_eater_lock.release()
return ""
self.subsize = await aiopath.getsize(file_path)
self.subname = file_
await run_metadata_cmd(self, cmd)
self.subproc = None
os.replace(temp_file, file_path)
return None

Expand All @@ -1457,7 +1460,9 @@ async def process_directory(directory, key):
if cmd:
checked = True
await cpu_eater_lock.acquire()
self.subsize = self.size
await run_metadata_cmd(self, cmd)
self.subproc = None
os.replace(temp_file, up_dir)
cpu_eater_lock.release()
else:
Expand Down
2 changes: 1 addition & 1 deletion bot/helper/ext_utils/media_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ async def run_metadata_cmd(listener, cmd):
if listener.is_cancelled:
return False
if code == 0:
return output
return True
if code == -9:
listener.is_cancelled = True
return False
Expand Down

0 comments on commit 1a4aecd

Please sign in to comment.