From 87ae11bda7f1cd514817897c5f438ff0ab4cf182 Mon Sep 17 00:00:00 2001 From: "Dr.Caduceus" Date: Thu, 9 Nov 2023 22:43:02 +0530 Subject: [PATCH 1/3] Bump to v1.4 --- bot/server/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/server/main.py b/bot/server/main.py index 2c794c5..558a33a 100644 --- a/bot/server/main.py +++ b/bot/server/main.py @@ -41,7 +41,7 @@ async def transmit_file(file_id): last_part_cut = until_bytes % chunk_size + 1 req_length = until_bytes - from_bytes + 1 - part_count = ceil(until_bytes / chunk_size) - offset + part_count = ceil(until_bytes / chunk_size) - floor((from_bytes - (from_bytes % chunk_size)) / chunk_size) disposition = 'inline' if 'video' in mime_type or 'audio' in mime_type or 'html' in mime_type else 'attachment' headers={ @@ -55,7 +55,7 @@ async def transmit_file(file_id): async def file_streamer(): current_part = 1 async for chunk in TelegramBot.stream_media(file, offset = offset): - + if not chunk: break elif part_count == 1: From e749ff2337a4a2c1fff8d5a6ce462fc68de9bddf Mon Sep 17 00:00:00 2001 From: "Dr.Caduceus" Date: Thu, 9 Nov 2023 22:45:03 +0530 Subject: [PATCH 2/3] Bump to v1.4 --- bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/__init__.py b/bot/__init__.py index c05a791..aa3c9c0 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -5,7 +5,7 @@ from .config import Telegram, LOGGER_CONFIG_JSON dictConfig(LOGGER_CONFIG_JSON) -version = 1.3 +version = 1.4 logger = getLogger('bot') TelegramBot = Client( From 241824a6f995aecffbd88342378c78f8c89d70c2 Mon Sep 17 00:00:00 2001 From: "Dr.Caduceus" Date: Thu, 9 Nov 2023 22:46:06 +0530 Subject: [PATCH 3/3] Bump to v1.4 --- bot/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/config.py b/bot/config.py index 56a8c5d..d2ce2dc 100644 --- a/bot/config.py +++ b/bot/config.py @@ -42,7 +42,7 @@ LOGGER_CONFIG_JSON = { 'handlers': ['file_handler', 'stream_handler'] }, 'uvicorn.error': { - 'level': 'CRITICAL', + 'level': 'WARNING', 'handlers': ['file_handler', 'stream_handler'] }, 'bot': {