mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-06 21:20:22 +03:00
Better handling of video notes
As said in https://t.me/TelethonChat/33059 , the "0,1,1" values work better for all kind of videos, instead of the "0,0,0", which gave some problems with videos not recorded by the official apps.
This commit is contained in:
parent
208adc93a6
commit
dc732c76df
|
@ -1632,9 +1632,12 @@ class TelegramClient(TelegramBareClient):
|
||||||
duration=int(m.get('duration').seconds
|
duration=int(m.get('duration').seconds
|
||||||
if m.has('duration') else 0)
|
if m.has('duration') else 0)
|
||||||
)
|
)
|
||||||
|
elif video_note:
|
||||||
|
doc = DocumentAttributeVideo(0, 1, 1,
|
||||||
|
round_message=True)
|
||||||
else:
|
else:
|
||||||
doc = DocumentAttributeVideo(0, 0, 0,
|
doc = DocumentAttributeVideo(0, 0, 0,
|
||||||
round_message=video_note)
|
round_message=False)
|
||||||
|
|
||||||
attr_dict[DocumentAttributeVideo] = doc
|
attr_dict[DocumentAttributeVideo] = doc
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user