From de3b346c1490fc7ebba47531cc87443c4b7d619d Mon Sep 17 00:00:00 2001 From: blank X Date: Wed, 26 May 2021 14:03:51 +0700 Subject: [PATCH] Use offset 131072 --- streamtg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamtg.py b/streamtg.py index b9c35f1..660da4e 100644 --- a/streamtg.py +++ b/streamtg.py @@ -131,7 +131,7 @@ async def handler(request): if tmp_offset > size: tmp_offset -= size continue - async for chunk in client._iter_download(i, offset=tmp_offset, msg_data=(chat_id, i.id)): + async for chunk in client._iter_download(i, offset=tmp_offset, limit=131072, msg_data=(chat_id, i.id)): yield chunk[:tmp_length] tmp_length -= len(chunk) if tmp_length < 1: