Fix thumbnail downloads
This commit is contained in:
parent
38efceefb1
commit
820fe2cbcd
@ -880,7 +880,7 @@ class Client(Methods, Scaffold):
|
|||||||
local_id=file_id.local_id,
|
local_id=file_id.local_id,
|
||||||
big=file_id.thumbnail_source == ThumbnailSource.CHAT_PHOTO_BIG
|
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(
|
location = raw.types.InputPhotoFileLocation(
|
||||||
id=file_id.media_id,
|
id=file_id.media_id,
|
||||||
access_hash=file_id.access_hash,
|
access_hash=file_id.access_hash,
|
||||||
@ -892,7 +892,7 @@ class Client(Methods, Scaffold):
|
|||||||
id=file_id.media_id,
|
id=file_id.media_id,
|
||||||
access_hash=file_id.access_hash,
|
access_hash=file_id.access_hash,
|
||||||
file_reference=file_id.file_reference,
|
file_reference=file_id.file_reference,
|
||||||
thumb_size=""
|
thumb_size=file_id.thumbnail_size
|
||||||
)
|
)
|
||||||
|
|
||||||
limit = 1024 * 1024
|
limit = 1024 * 1024
|
||||||
|
@ -166,7 +166,7 @@ class FileId:
|
|||||||
volume_id: int = None,
|
volume_id: int = None,
|
||||||
thumbnail_source: ThumbnailSource = None,
|
thumbnail_source: ThumbnailSource = None,
|
||||||
thumbnail_file_type: FileType = None,
|
thumbnail_file_type: FileType = None,
|
||||||
thumbnail_size: str = None,
|
thumbnail_size: str = "",
|
||||||
secret: int = None,
|
secret: int = None,
|
||||||
local_id: int = None,
|
local_id: int = None,
|
||||||
chat_id: int = None,
|
chat_id: int = None,
|
||||||
|
Loading…
Reference in New Issue
Block a user