Handle progressive size in _photo_size_byte_count

This commit is contained in:
Lonami Exo 2021-02-13 22:49:03 +01:00
parent 73b9de2085
commit b102f1f345

View File

@ -1550,5 +1550,7 @@ def _photo_size_byte_count(size):
return len(size.bytes)
elif isinstance(size, types.PhotoSizeEmpty):
return 0
elif isinstance(size, types.PhotoSizeProgressive):
return max(size.sizes)
else:
return None