mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
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:
parent
c2998466b0
commit
4f5fc6b7f4
@ -213,7 +213,7 @@ class SendMediaGroup:
|
|||||||
thumb=await self.save_file(i.thumb),
|
thumb=await self.save_file(i.thumb),
|
||||||
spoiler=i.has_spoiler,
|
spoiler=i.has_spoiler,
|
||||||
mime_type=self.guess_mime_type(i.media) or "video/mp4",
|
mime_type=self.guess_mime_type(i.media) or "video/mp4",
|
||||||
nosound_video=i.no_sound,
|
nosound_video=True,
|
||||||
attributes=[
|
attributes=[
|
||||||
raw.types.DocumentAttributeVideo(
|
raw.types.DocumentAttributeVideo(
|
||||||
supports_streaming=i.supports_streaming or None,
|
supports_streaming=i.supports_streaming or None,
|
||||||
@ -267,7 +267,7 @@ class SendMediaGroup:
|
|||||||
thumb=await self.save_file(i.thumb),
|
thumb=await self.save_file(i.thumb),
|
||||||
spoiler=i.has_spoiler,
|
spoiler=i.has_spoiler,
|
||||||
mime_type=self.guess_mime_type(getattr(i.media, "name", "video.mp4")) or "video/mp4",
|
mime_type=self.guess_mime_type(getattr(i.media, "name", "video.mp4")) or "video/mp4",
|
||||||
nosound_video=i.no_sound,
|
nosound_video=True,
|
||||||
attributes=[
|
attributes=[
|
||||||
raw.types.DocumentAttributeVideo(
|
raw.types.DocumentAttributeVideo(
|
||||||
supports_streaming=i.supports_streaming or None,
|
supports_streaming=i.supports_streaming or None,
|
||||||
|
@ -57,7 +57,7 @@ class SendVideo:
|
|||||||
quote_offset: int = None,
|
quote_offset: int = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
no_sound: bool = None,
|
no_sound: bool = True,
|
||||||
business_connection_id: str = None,
|
business_connection_id: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
Loading…
Reference in New Issue
Block a user