Add subdl beta

This commit is contained in:
yasir 2023-03-04 12:25:53 +07:00
parent 0fb0dd7139
commit bad680c86e
2 changed files with 7 additions and 3 deletions

View file

@ -53,10 +53,12 @@ async def genss(client, m):
process = await kirimPesan(m, "<code>Processing, please wait..</code>", quote=True)
c_time = time.time()
the_real_download_location = await replied.download(
dl = await replied.download(
file_name="/downloads",
progress=progress_for_pyrogram,
progress_args=("Trying to download, please wait..", process, c_time),
)
the_real_download_location = os.path.join("/downloads", os.path.basename(dl))
if the_real_download_location is not None:
try:
await editPesan(process, f"File video berhasil didownload dengan path <code>{the_real_download_location}</code>.")

View file

@ -8,7 +8,7 @@
import io
import subprocess
import time
from os import remove as osremove
from os import remove as osremove, path
from pyrogram import filters
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
@ -33,10 +33,12 @@ async def mediainfo(client, message):
return await editPesan(process, "Please reply to valid media.")
c_time = time.time()
file_path = await message.reply_to_message.download(
dl = await message.reply_to_message.download(
file_name="/downloads",
progress=progress_for_pyrogram,
progress_args=("Trying to download..", process, c_time),
)
file_path = path.join("/downloads", path.basename(dl))
output_ = await runcmd(f'mediainfo "{file_path}"')
out = output_[0] if len(output_) != 0 else None
body_text = f"""