OSDN Git Service

動画ダウンロード処理中にキャンセルできる処理を実装
[coroid/NicoBrowser.git] / src / nicobrowser / NicoHttpClient.java
index b206227..e1f1a22 100644 (file)
@@ -735,6 +735,9 @@ public class NicoHttpClient {
             out.write(buffer, 0, i);
             downloadSize += i;
             listener.progress(fileSize, downloadSize);
+            if(listener.getCancel()){
+                return new GetFlvResult(null, Status.GET_INFO, userName);
+            }
         }
 
         response.getEntity().consumeContent();