mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-23 05:26:42 +00:00
Don't check if offset is divisible by limit if limit is None
Should fix #3058.
This commit is contained in:
parent
85381713b2
commit
3d350c6087
@ -703,7 +703,7 @@ class DownloadMethods:
|
|||||||
if chunk_size == request_size \
|
if chunk_size == request_size \
|
||||||
and offset % MIN_CHUNK_SIZE == 0 \
|
and offset % MIN_CHUNK_SIZE == 0 \
|
||||||
and stride % MIN_CHUNK_SIZE == 0 \
|
and stride % MIN_CHUNK_SIZE == 0 \
|
||||||
and offset % limit == 0:
|
and (limit is None or offset % limit == 0):
|
||||||
cls = _DirectDownloadIter
|
cls = _DirectDownloadIter
|
||||||
self._log[__name__].info('Starting direct file download in chunks of '
|
self._log[__name__].info('Starting direct file download in chunks of '
|
||||||
'%d at %d, stride %d', request_size, offset, stride)
|
'%d at %d, stride %d', request_size, offset, stride)
|
||||||
|
Loading…
Reference in New Issue
Block a user