Visitar URL original
Fix thumbnail downloads · MrBotDeveloper/pyrogram@820fe2c · GitHub
Skip to content

Commit 820fe2c

Browse files
committed
Fix thumbnail downloads
1 parent 38efcee commit 820fe2c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎pyrogram/client.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ async def get_file(
880880
local_id=file_id.local_id,
881881
big=file_id.thumbnail_source == ThumbnailSource.CHAT_PHOTO_BIG
882882
)
883-
elif file_type in (FileType.THUMBNAIL, FileType.PHOTO):
883+
elif file_type == FileType.PHOTO:
884884
location = raw.types.InputPhotoFileLocation(
885885
id=file_id.media_id,
886886
access_hash=file_id.access_hash,
@@ -892,7 +892,7 @@ async def get_file(
892892
id=file_id.media_id,
893893
access_hash=file_id.access_hash,
894894
file_reference=file_id.file_reference,
895-
thumb_size=""
895+
thumb_size=file_id.thumbnail_size
896896
)
897897

898898
limit = 1024 * 1024

‎pyrogram/file_id.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def __init__(
166166
volume_id: int = None,
167167
thumbnail_source: ThumbnailSource = None,
168168
thumbnail_file_type: FileType = None,
169-
thumbnail_size: str = None,
169+
thumbnail_size: str = "",
170170
secret: int = None,
171171
local_id: int = None,
172172
chat_id: int = None,

0 commit comments

Comments
 (0)