Fix thumbnail downloads

This commit is contained in:
Dan 2021-01-01 22:21:06 +01:00
parent 38efceefb1
commit 820fe2cbcd
2 changed files with 3 additions and 3 deletions

View File

@ -880,7 +880,7 @@ class Client(Methods, Scaffold):
local_id=file_id.local_id,
big=file_id.thumbnail_source == ThumbnailSource.CHAT_PHOTO_BIG
)
elif file_type in (FileType.THUMBNAIL, FileType.PHOTO):
elif file_type == FileType.PHOTO:
location = raw.types.InputPhotoFileLocation(
id=file_id.media_id,
access_hash=file_id.access_hash,
@ -892,7 +892,7 @@ class Client(Methods, Scaffold):
id=file_id.media_id,
access_hash=file_id.access_hash,
file_reference=file_id.file_reference,
thumb_size=""
thumb_size=file_id.thumbnail_size
)
limit = 1024 * 1024

View File

@ -166,7 +166,7 @@ class FileId:
volume_id: int = None,
thumbnail_source: ThumbnailSource = None,
thumbnail_file_type: FileType = None,
thumbnail_size: str = None,
thumbnail_size: str = "",
secret: int = None,
local_id: int = None,
chat_id: int = None,