Skip to content

Commit

Permalink
Auto-format code [skip actions]
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Jan 7, 2025
1 parent 77b3db2 commit 18553b5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bot/helper/aeon_utils/caption_gen.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import json
import os
from contextlib import suppress
from hashlib import md5

from aiofiles.os import path as aiopath
from langcodes import Language
import json

from bot import LOGGER
from bot.helper.ext_utils.bot_utils import cmd_exec
Expand Down Expand Up @@ -44,7 +45,9 @@ async def generate_caption(file, dirpath, lcaption):
update_language("", audio) for audio in audio_info if audio.get("Language")
)
stitles = ", ".join(
update_subtitles("", subtitle) for subtitle in subtitle_info if subtitle.get("Language")
update_subtitles("", subtitle)
for subtitle in subtitle_info
if subtitle.get("Language")
)

lang = lang if lang else "Unknown"
Expand Down Expand Up @@ -106,4 +109,4 @@ def calculate_md5(filepath):
with open(filepath, "rb") as f:
for byte_block in iter(lambda: f.read(4096), b""):
hash_md5.update(byte_block)
return hash_md5.hexdigest()
return hash_md5.hexdigest()

0 comments on commit 18553b5

Please sign in to comment.