1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Fix video's thumb type forgot de_json.

This commit is contained in:
eternnoir 2015-10-17 02:30:22 +08:00
parent f355796b01
commit 7346326bc3

View File

@ -342,7 +342,9 @@ class Video(JsonDeserializable):
width = obj['width'] width = obj['width']
height = obj['height'] height = obj['height']
duration = obj['duration'] duration = obj['duration']
thumb = obj.get('thumb') thumb = None
if 'thumb' in obj:
thumb = PhotoSize.de_json(obj['thumb'])
mime_type = obj.get('mime_type') mime_type = obj.get('mime_type')
file_size = obj.get('file_size') file_size = obj.get('file_size')
return cls(file_id, width, height, duration, thumb, mime_type, file_size) return cls(file_id, width, height, duration, thumb, mime_type, file_size)