|
@@ -104,7 +104,7 @@ public class VideoDownloader {
|
|
|
try (InputStream inputStream = connection.getInputStream();
|
|
|
OutputStream outputStream = Files.newOutputStream(file.toPath())) {
|
|
|
byte[] buffer = new byte[1024 * 1024];
|
|
|
- long lastReadTime;
|
|
|
+ long lastReadTime = System.currentTimeMillis();
|
|
|
int bytesRead;
|
|
|
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
|
|
outputStream.write(buffer, 0, bytesRead);
|