Fix sending no-sound videos in media group & sending media as videos by default in send_video (#72)

* fix: sending all videos in media groups as videos (not GIFs)

* feature: send media as video by default in `send_video`
This commit is contained in:
Danipulok 2024-06-16 09:29:36 +03:00 committed by GitHub
parent c2998466b0
commit 4f5fc6b7f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -213,7 +213,7 @@ class SendMediaGroup:
thumb=await self.save_file(i.thumb),
spoiler=i.has_spoiler,
mime_type=self.guess_mime_type(i.media) or "video/mp4",
nosound_video=i.no_sound,
nosound_video=True,
attributes=[
raw.types.DocumentAttributeVideo(
supports_streaming=i.supports_streaming or None,
@ -267,7 +267,7 @@ class SendMediaGroup:
thumb=await self.save_file(i.thumb),
spoiler=i.has_spoiler,
mime_type=self.guess_mime_type(getattr(i.media, "name", "video.mp4")) or "video/mp4",
nosound_video=i.no_sound,
nosound_video=True,
attributes=[
raw.types.DocumentAttributeVideo(
supports_streaming=i.supports_streaming or None,

View File

@ -57,7 +57,7 @@ class SendVideo:
quote_offset: int = None,
schedule_date: datetime = None,
protect_content: bool = None,
no_sound: bool = None,
no_sound: bool = True,
business_connection_id: str = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",