mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Handle FloodWaitError in client.download_media
Fixes #1426. Not entirely happy with the new indirection layer, but the original __call__ method is already a mess anyway and the additional cost of an extra call should be neglible compared to the actual IO.
This commit is contained in:
@@ -68,7 +68,7 @@ class _DirectDownloadIter(RequestIter):
|
||||
|
||||
async def _request(self):
|
||||
try:
|
||||
result = await self._sender.send(self.request)
|
||||
result = await self.client._call(self._sender, self.request)
|
||||
if isinstance(result, types.upload.FileCdnRedirect):
|
||||
raise NotImplementedError # TODO Implement
|
||||
else:
|
||||
|
Reference in New Issue
Block a user