mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-21 17:06:36 +03:00
Fix _get_thumb failed when document had no thumbs
This commit is contained in:
parent
164d35681e
commit
816b0bdf9f
|
@ -741,6 +741,9 @@ class DownloadMethods:
|
|||
|
||||
@staticmethod
|
||||
def _get_thumb(thumbs, thumb):
|
||||
if not thumbs:
|
||||
return None
|
||||
|
||||
# Seems Telegram has changed the order and put `PhotoStrippedSize`
|
||||
# last while this is the smallest (layer 116). Ensure we have the
|
||||
# sizes sorted correctly with a custom function.
|
||||
|
|
Loading…
Reference in New Issue
Block a user