Fix downloading photos with download_file (#1164)

This commit is contained in:
Lonami Exo 2019-04-24 12:37:19 +02:00
parent 08f8aa3c52
commit 21aec00e46
2 changed files with 2 additions and 2 deletions

View File

@ -634,7 +634,7 @@ def get_input_location(location):
id=location.id,
access_hash=location.access_hash,
file_reference=location.file_reference,
thumb_size='' # Presumably to download one of its thumbnails
thumb_size=location.sizes[-1].type
))
if isinstance(location, types.FileLocationToBeDeprecated):

View File

@ -141,7 +141,7 @@ MESSAGE_TOO_LONG,400,Message was too long. Current maximum length is 4096 UTF-8
MSG_WAIT_FAILED,400,A waiting call returned an error
MT_SEND_QUEUE_TOO_LONG,500,
NEED_CHAT_INVALID,500,The provided chat is invalid
NEED_MEMBER_INVALID,500,The provided member is invalid
NEED_MEMBER_INVALID,500,The provided member is invalid or does not exist (for example a thumb size)
NETWORK_MIGRATE_X,303,The source IP address is associated with DC {new_dc}
NEW_SALT_INVALID,400,The new salt is invalid
NEW_SETTINGS_INVALID,400,The new settings are invalid

1 name codes description
141 MSG_WAIT_FAILED 400 A waiting call returned an error
142 MT_SEND_QUEUE_TOO_LONG 500
143 NEED_CHAT_INVALID 500 The provided chat is invalid
144 NEED_MEMBER_INVALID 500 The provided member is invalid The provided member is invalid or does not exist (for example a thumb size)
145 NETWORK_MIGRATE_X 303 The source IP address is associated with DC {new_dc}
146 NEW_SALT_INVALID 400 The new salt is invalid
147 NEW_SETTINGS_INVALID 400 The new settings are invalid