mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-09 05:04:50 +00:00
Fix
This commit is contained in:
parent
f7f1a0d38c
commit
03fe29580b
2 changed files with 5 additions and 5 deletions
|
|
@ -212,14 +212,14 @@ async def telegram_screenshot(client, message, frame_count):
|
||||||
return await kirimPesan(message, "Can only generate screenshots from video file....", quote=True)
|
return await kirimPesan(message, "Can only generate screenshots from video file....", quote=True)
|
||||||
|
|
||||||
# Downloading partial file.
|
# Downloading partial file.
|
||||||
replymsg = await kirimPesan(message, f"Downloading partial video file....", quote=True)
|
msg = await kirimPesan(message, f"Downloading partial video file....", quote=True)
|
||||||
|
|
||||||
if int(size) <= 200000000:
|
if int(size) <= 200000000:
|
||||||
c_time = time.time()
|
c_time = time.time()
|
||||||
await replymsg.download(
|
await replymsg.download(
|
||||||
os.path.join(os.getcwd(), file_name),
|
os.path.join(os.getcwd(), file_name),
|
||||||
progress=progress_for_pyrogram,
|
progress=progress_for_pyrogram,
|
||||||
progress_args=("Trying to download..", replymsg, c_time)
|
progress_args=("Trying to download..", msg, c_time)
|
||||||
)
|
)
|
||||||
downloaded_percentage = 100 # (100% download)
|
downloaded_percentage = 100 # (100% download)
|
||||||
|
|
||||||
|
|
@ -231,7 +231,7 @@ async def telegram_screenshot(client, message, frame_count):
|
||||||
|
|
||||||
downloaded_percentage = 25
|
downloaded_percentage = 25
|
||||||
|
|
||||||
await replymsg.edit("Partial file downloaded....")
|
await msg.edit("Partial file downloaded....")
|
||||||
# Partial file downloaded
|
# Partial file downloaded
|
||||||
|
|
||||||
mediainfo_json = json.loads(subprocess.check_output(["mediainfo", file_name, "--Output=JSON"]).decode("utf-8"))
|
mediainfo_json = json.loads(subprocess.check_output(["mediainfo", file_name, "--Output=JSON"]).decode("utf-8"))
|
||||||
|
|
@ -244,7 +244,7 @@ async def telegram_screenshot(client, message, frame_count):
|
||||||
|
|
||||||
await generate_ss_from_file(
|
await generate_ss_from_file(
|
||||||
message,
|
message,
|
||||||
replymsg,
|
msg,
|
||||||
file_name,
|
file_name,
|
||||||
frame_count,
|
frame_count,
|
||||||
file_duration=partial_file_duration)
|
file_duration=partial_file_duration)
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ async def telegram_mediainfo(client, message):
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
async for chunk in client.stream_media(replymsg, limit=5):
|
async for chunk in client.stream_media(replymsg, limit=10):
|
||||||
with open(filename, 'ab') as f:
|
with open(filename, 'ab') as f:
|
||||||
f.write(chunk)
|
f.write(chunk)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue