Fix _get_thumb failed when document had no thumbs

This commit is contained in:
Lonami Exo 2023-07-21 22:48:12 +02:00
parent 164d35681e
commit 816b0bdf9f

View File

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