mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +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
|
@staticmethod
|
||||||
def _get_thumb(thumbs, thumb):
|
def _get_thumb(thumbs, thumb):
|
||||||
|
if not thumbs:
|
||||||
|
return None
|
||||||
|
|
||||||
# Seems Telegram has changed the order and put `PhotoStrippedSize`
|
# Seems Telegram has changed the order and put `PhotoStrippedSize`
|
||||||
# last while this is the smallest (layer 116). Ensure we have the
|
# last while this is the smallest (layer 116). Ensure we have the
|
||||||
# sizes sorted correctly with a custom function.
|
# sizes sorted correctly with a custom function.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user