From 6ee4cc72376f9fc012e8a7599c17806db700f115 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Fri, 21 Mar 2025 14:18:46 +0300 Subject: [PATCH] Enhance video flag detection to include animation media type in post parsing --- post_parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/post_parser.py b/post_parser.py index 4355b1a..446f59f 100644 --- a/post_parser.py +++ b/post_parser.py @@ -206,8 +206,9 @@ class PostParser: getattr(message, "forward_sender_name", None)): flags.append("fwd") - # Add flag "video" if the message media is VIDEO and the body text is up to 100 characters. - if message.media == MessageMediaType.VIDEO and len(message_text.strip()) <= 100: + # Add flag "video" if the message media is VIDEO or ANIMATION and the body text is up to 100 characters. + if (message.media in [MessageMediaType.VIDEO, MessageMediaType.ANIMATION] and + len(message_text.strip()) <= 100): flags.append("video") # Add flag for posts without images