Modified converters to support pngs option of lottieconverter

See https://github.com/Eramde/LottieConverter/commit/37e73d8dc15152e050288ea0a55541546dde84d1
This commit is contained in:
Randall Lawrence
2019-10-05 20:09:14 +03:00
parent d2edf12fdf
commit 0726289c7a
4 changed files with 55 additions and 22 deletions
+2 -1
View File
@@ -206,8 +206,9 @@ async def _unlocked_transfer_file_to_matrix(client: MautrixTelegramClient, inten
if is_sticker and tgs_convert and (mime_type == "application/gzip" or (
mime_type == "application/octet-stream"
and magic.from_buffer(file).startswith("gzip"))):
mime_type, file, width, height, thumbnail = await convert_tgs_to(
mime_type, file, width, height = await convert_tgs_to(
file, tgs_convert["target"], **tgs_convert["args"])
thumbnail = None
image_converted = mime_type != "application/gzip"
if mime_type == "image/webp":