From d4abb1fc623155e74a8bd263413dc74c8a1381e8 Mon Sep 17 00:00:00 2001 From: thedragonsinn <98635854+thedragonsinn@users.noreply.github.com> Date: Wed, 12 Feb 2025 17:53:44 +0530 Subject: [PATCH] rollback song --- app/plugins/misc/song.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/plugins/misc/song.py b/app/plugins/misc/song.py index 7de4878..1c23a4d 100644 --- a/app/plugins/misc/song.py +++ b/app/plugins/misc/song.py @@ -6,7 +6,6 @@ import shutil from time import time from urllib.parse import urlparse -from pyrogram.types import InputMediaAudio from ub_core.utils import MediaExts, aio, run_shell_cmd from app import BOT, Message @@ -61,13 +60,11 @@ async def song_dl(bot: BOT, message: Message) -> None | Message: for audio_file in down_path: if audio_file.endswith(tuple(MediaExts.AUDIO)): - await message.edit_media( - InputMediaAudio( - media=audio_file, - duration=int(duration), - performer=str(artist), - thumb=thumb, - ) + await message.reply_audio( + audio=audio_file, + duration=int(duration), + performer=str(artist), + thumb=thumb, ) await response.delete() @@ -92,7 +89,7 @@ async def get_download_info(query: str, path: str): f"'{query}'" ) try: - song_info = (await run_shell_cmd(download_cmd, timeout=60, ret_val="")).strip() + song_info = (await run_shell_cmd(download_cmd)).strip() serialised_json = json.loads(song_info) return serialised_json