diff --git a/bot/helper/common.py b/bot/helper/common.py index fad2008d1..b5a1cb74f 100644 --- a/bot/helper/common.py +++ b/bot/helper/common.py @@ -24,7 +24,7 @@ ) from bot.core.aeon_client import TgClient from bot.core.config_manager import Config -from bot.helper.aeon_utils.metadata_editor import get_streams, get_metadata_cmd +from bot.helper.aeon_utils.metadata_editor import get_metadata_cmd from .ext_utils.bot_utils import get_size_bytes, new_task, sync_to_async from .ext_utils.bulk_links import extract_bulk_links @@ -1330,6 +1330,7 @@ async def proceed_metadata(self, dl_path, gid): async with task_dict_lock: task_dict[self.mid] = FFmpegStatus(self, gid, "Metadata") checked = False + async def _process_directory(directory, key): for dirpath, _, files in await sync_to_async( walk, @@ -1353,6 +1354,7 @@ async def _process_directory(directory, key): self.subproc = None os.replace(temp_file, file_path) return None + if self.is_file: if is_mkv(dl_path): cmd, temp_file = await get_metadata_cmd(dl_path, key) @@ -1368,4 +1370,4 @@ async def _process_directory(directory, key): if checked: cpu_eater_lock.release() - return dl_path \ No newline at end of file + return dl_path diff --git a/bot/helper/ext_utils/media_utils.py b/bot/helper/ext_utils/media_utils.py index 1d0731aa1..8b42c75af 100644 --- a/bot/helper/ext_utils/media_utils.py +++ b/bot/helper/ext_utils/media_utils.py @@ -676,6 +676,7 @@ async def create_sample_video(listener, video_file, sample_duration, part_durati await remove(output_file) return False + async def run_ffmpeg_cmd(listener, cmd, path=None, is_ffmpeg=False): if is_ffmpeg and path: base_name, ext = ospath.splitext(path)