mirror of
https://github.com/tgbot-collection/ytdlbot.git
synced 2025-02-25 07:44:13 +08:00
add upload size
This commit is contained in:
parent
8f2ff8f8bf
commit
7d8987de69
1 changed files with 2 additions and 1 deletions
3
ytdl.py
3
ytdl.py
|
@ -127,7 +127,8 @@ async def upload_callback(current, total, chat_id, message):
|
||||||
# if the key exists, we shouldn't send edit message
|
# if the key exists, we shouldn't send edit message
|
||||||
if not r.exists(key):
|
if not r.exists(key):
|
||||||
r.set(key, "ok", ex=EXPIRE)
|
r.set(key, "ok", ex=EXPIRE)
|
||||||
msg = f'Uploading {round(current / total * 100, 2)}%: {current}/{total}'
|
filesize = sizeof_fmt(total)
|
||||||
|
msg = f'[{filesize}]: Uploading {round(current / total * 100, 2)}% - {current}/{total}'
|
||||||
await bot.edit_message(chat_id, message, msg)
|
await bot.edit_message(chat_id, message, msg)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue