mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-21 07:46:55 +00:00
Cleanup
This commit is contained in:
1 parent
44d75d9955
commit
2aa240337c
27 files changed
+146
-232
No files matched your search
@@ -19,7 +19,6 @@
|
||||
package com.volmit.iris.util.scheduling.jobs;
|
||||
|
||||
import com.volmit.iris.util.network.DL;
|
||||
import com.volmit.iris.util.network.DownloadMonitor;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -35,15 +34,12 @@ public class DownloadJob implements Job {
|
||||
tw = 1;
|
||||
cw = 0;
|
||||
download = new DL.Download(new URL(url), destination, DL.DownloadFlag.CALCULATE_SIZE);
|
||||
download.monitor(new DownloadMonitor() {
|
||||
@Override
|
||||
public void onUpdate(DL.DownloadState state, double progress, long elapsed, long estimated, long bps, long iobps, long size, long downloaded, long buffer, double bufferuse) {
|
||||
if (size == -1) {
|
||||
tw = 1;
|
||||
} else {
|
||||
tw = (int) (size / 100);
|
||||
cw = (int) (downloaded / 100);
|
||||
}
|
||||
download.monitor((state, progress, elapsed, estimated, bps, iobps, size, downloaded, buffer, bufferuse) -> {
|
||||
if (size == -1) {
|
||||
tw = 1;
|
||||
} else {
|
||||
tw = (int) (size / 100);
|
||||
cw = (int) (downloaded / 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user