mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-10-31 07:57:38 +03:00 
			
		
		
		
	
							parent
							
								
									75db9f70df
								
							
						
					
					
						commit
						b0158b3f65
					
				|  | @ -810,6 +810,11 @@ class DownloadMethods: | ||||||
|         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) | ||||||
| 
 | 
 | ||||||
|  |         if isinstance(size, types.PhotoSizeProgressive): | ||||||
|  |             file_size = max(size.sizes) | ||||||
|  |         else: | ||||||
|  |             file_size = size.size | ||||||
|  | 
 | ||||||
|         result = await self.download_file( |         result = await self.download_file( | ||||||
|             types.InputPhotoFileLocation( |             types.InputPhotoFileLocation( | ||||||
|                 id=photo.id, |                 id=photo.id, | ||||||
|  | @ -818,7 +823,7 @@ class DownloadMethods: | ||||||
|                 thumb_size=size.type |                 thumb_size=size.type | ||||||
|             ), |             ), | ||||||
|             file, |             file, | ||||||
|             file_size=size.size, |             file_size=file_size, | ||||||
|             progress_callback=progress_callback |             progress_callback=progress_callback | ||||||
|         ) |         ) | ||||||
|         return result if file is bytes else file |         return result if file is bytes else file | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user