mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-09 05:04:50 +00:00
Add subdl beta
This commit is contained in:
parent
0fb0dd7139
commit
bad680c86e
2 changed files with 7 additions and 3 deletions
|
|
@ -53,10 +53,12 @@ async def genss(client, m):
|
||||||
process = await kirimPesan(m, "<code>Processing, please wait..</code>", quote=True)
|
process = await kirimPesan(m, "<code>Processing, please wait..</code>", quote=True)
|
||||||
|
|
||||||
c_time = time.time()
|
c_time = time.time()
|
||||||
the_real_download_location = await replied.download(
|
dl = await replied.download(
|
||||||
|
file_name="/downloads",
|
||||||
progress=progress_for_pyrogram,
|
progress=progress_for_pyrogram,
|
||||||
progress_args=("Trying to download, please wait..", process, c_time),
|
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:
|
if the_real_download_location is not None:
|
||||||
try:
|
try:
|
||||||
await editPesan(process, f"File video berhasil didownload dengan path <code>{the_real_download_location}</code>.")
|
await editPesan(process, f"File video berhasil didownload dengan path <code>{the_real_download_location}</code>.")
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
import io
|
import io
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
from os import remove as osremove
|
from os import remove as osremove, path
|
||||||
|
|
||||||
from pyrogram import filters
|
from pyrogram import filters
|
||||||
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
||||||
|
|
@ -33,10 +33,12 @@ async def mediainfo(client, message):
|
||||||
return await editPesan(process, "Please reply to valid media.")
|
return await editPesan(process, "Please reply to valid media.")
|
||||||
|
|
||||||
c_time = time.time()
|
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=progress_for_pyrogram,
|
||||||
progress_args=("Trying to download..", process, c_time),
|
progress_args=("Trying to download..", process, c_time),
|
||||||
)
|
)
|
||||||
|
file_path = path.join("/downloads", path.basename(dl))
|
||||||
output_ = await runcmd(f'mediainfo "{file_path}"')
|
output_ = await runcmd(f'mediainfo "{file_path}"')
|
||||||
out = output_[0] if len(output_) != 0 else None
|
out = output_[0] if len(output_) != 0 else None
|
||||||
body_text = f"""
|
body_text = f"""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue