mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Don't attempt thumb download if there is no thumb
This commit is contained in:
parent
438aff3545
commit
131f021d51
|
@ -886,6 +886,9 @@ class DownloadMethods:
|
||||||
else:
|
else:
|
||||||
file = self._get_proper_filename(file, 'photo', '.jpg', date=date)
|
file = self._get_proper_filename(file, 'photo', '.jpg', date=date)
|
||||||
size = self._get_thumb(document.thumbs, thumb)
|
size = self._get_thumb(document.thumbs, thumb)
|
||||||
|
if not size or isinstance(size, types.PhotoSizeEmpty):
|
||||||
|
return
|
||||||
|
|
||||||
if isinstance(size, (types.PhotoCachedSize, types.PhotoStrippedSize)):
|
if isinstance(size, (types.PhotoCachedSize, types.PhotoStrippedSize)):
|
||||||
return self._download_cached_photo_size(size, file)
|
return self._download_cached_photo_size(size, file)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user