mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-06 20:04:51 +00:00
Fix
This commit is contained in:
parent
e163a2c60e
commit
f8198e61a2
1 changed files with 3 additions and 3 deletions
|
|
@ -82,21 +82,21 @@ async def telegram_mediainfo(client, message):
|
||||||
|
|
||||||
if int(size) <= 50000000:
|
if int(size) <= 50000000:
|
||||||
c_time = time.time()
|
c_time = time.time()
|
||||||
await message.download(
|
await replymsg.download(
|
||||||
os.path.join(os.getcwd(), filename),
|
os.path.join(os.getcwd(), filename),
|
||||||
progress=progress_for_pyrogram,
|
progress=progress_for_pyrogram,
|
||||||
progress_args=("Trying to download..", reply_msg, c_time)
|
progress_args=("Trying to download..", reply_msg, c_time)
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
async for chunk in client.stream_media(message, limit=5):
|
async for chunk in client.stream_media(replymsg, limit=5):
|
||||||
with open(filename, 'ab') as f:
|
with open(filename, 'ab') as f:
|
||||||
f.write(chunk)
|
f.write(chunk)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
output_ = await runcmd(f'mediainfo "{filename}"')
|
output_ = await runcmd(f'mediainfo "{filename}"')
|
||||||
out = output_[0] if len(output_) != 0 else None
|
out = output_[0] if len(output_) != 0 else None
|
||||||
file_info = get_file_id(message.reply_to_message)
|
file_info = get_file_id(replymsg)
|
||||||
content = f"""
|
content = f"""
|
||||||
MissKatyBot MediaInfo
|
MissKatyBot MediaInfo
|
||||||
JSON
|
JSON
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue