1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 09:38:57 +01:00
This commit is contained in:
Daniil Gentili 2017-02-05 12:57:02 +01:00
commit 9a7cda471d

View File

@ -552,7 +552,9 @@ trait FilesHandler
$size = $end - $offset; $size = $end - $offset;
$part_size = 512 * 1024; $part_size = 512 * 1024;
$percent = 0; $percent = 0;
if (isset($info['InputFileLocation']['dc_id'])) $this->API->switch_dc($info['InputFileLocation']['dc_id']); if (isset($info['InputFileLocation']['dc_id'])) {
$this->API->switch_dc($info['InputFileLocation']['dc_id']);
}
while ($percent < 100) { while ($percent < 100) {
$real_part_size = ($offset + $part_size > $end) ? $part_size - (($offset + $part_size) - $end) : $part_size; $real_part_size = ($offset + $part_size > $end) ? $part_size - (($offset + $part_size) - $end) : $part_size;