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:
ferferga 2018-05-16 23:05:22 +02:00 committed by GitHub
parent 208adc93a6
commit dc732c76df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: