OSDN Git Service

進捗報告実装
[coroid/inqubus.git] / frontend / src / saccubus / worker / impl / download / Download.java
index 51810e1..eb5b166 100644 (file)
@@ -80,7 +80,7 @@ public class Download extends Worker<DownloadResult, DownloadProgress> {
     @Override
     public DownloadResult work() throws Exception {
 
-        publish(new DownloadProgress(PROCESS, "ログイン中"));
+        publish(new DownloadProgress(PROCESS, 0.0, "ログイン中"));
 
         NicoHttpClient client = null;
         nicobrowser.VideoInfo vi = null;
@@ -132,7 +132,7 @@ public class Download extends Worker<DownloadResult, DownloadProgress> {
                 @Override
                 public void progress(long fileSize, long downloadSize) {
                     final double vol = (double) downloadSize / (double) fileSize * 100.0;
-                    publish(new DownloadProgress(PROCESS, String.format("ダウンロード%.2f%%", vol)));
+                    publish(new DownloadProgress(PROCESS, vol, String.format("ダウンロード%.2f%%", vol)));
                 }
             });