From cd587dd212fe20c8c7e9d44c6b009614eae38bef Mon Sep 17 00:00:00 2001 From: AriaLyy <511455842@qq.com> Date: Fri, 13 Oct 2017 17:31:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1=E7=BB=84?= =?UTF-8?q?=E3=80=81=E4=B8=8A=E4=BC=A0=E4=BB=BB=E5=8A=A1=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../arialyy/aria/core/command/normal/StartCmd.java | 12 +++++++++++- DEV_LOG.md | 1 + README.md | 4 ++-- .../download/multi_download/MultiTaskActivity.java | 2 +- build.gradle | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/normal/StartCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/normal/StartCmd.java index b1439957..d5650547 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/normal/StartCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/normal/StartCmd.java @@ -25,6 +25,9 @@ import com.arialyy.aria.core.download.DownloadTaskEntity; import com.arialyy.aria.core.inf.AbsTask; import com.arialyy.aria.core.inf.AbsTaskEntity; import com.arialyy.aria.core.inf.IEntity; +import com.arialyy.aria.core.queue.DownloadGroupTaskQueue; +import com.arialyy.aria.core.queue.DownloadTaskQueue; +import com.arialyy.aria.core.queue.UploadTaskQueue; import com.arialyy.aria.core.upload.UploadTaskEntity; import com.arialyy.aria.orm.DbEntity; import com.arialyy.aria.util.NetUtils; @@ -83,7 +86,7 @@ class StartCmd extends AbsNormalCmd { startTask(); } } - if (mQueue.getCurrentCachePoolNum() == 0){ + if (mQueue.getCurrentCachePoolNum() == 0) { findAllWaitTask(); } } @@ -136,6 +139,13 @@ class StartCmd extends AbsNormalCmd { private void handleTask(List waitList) { for (AbsTaskEntity te : waitList) { + if (te instanceof DownloadTaskEntity) { + mQueue = DownloadTaskQueue.getInstance(); + } else if (te instanceof UploadTaskEntity) { + mQueue = UploadTaskQueue.getInstance(); + } else if (te instanceof DownloadGroupTaskEntity) { + mQueue = DownloadGroupTaskQueue.getInstance(); + } createTask(te); } } diff --git a/DEV_LOG.md b/DEV_LOG.md index 16c211cc..8cf4311a 100644 --- a/DEV_LOG.md +++ b/DEV_LOG.md @@ -1,4 +1,5 @@ ## 开发日志 + + v_3.3.5 修复任务组、上传任务无法启动的bug + v_3.3.4 优化任务代码结构,修复上一个版本暂停后无法自动执行任务的问题 + v_3.3.3 修复进度条错乱的问题,修复同一时间多次调用start导致重复下载的问题 + v_3.3.2 新加reTry(),修复上一个版本不会回调失败事件的问题;增加running状态下5秒钟保存一次数据库的功能;修复FTP断点上传文件不完整的问题 diff --git a/README.md b/README.md index aa3b8b26..c1488d12 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ Aria有以下特点: [![Download](https://api.bintray.com/packages/arialyy/maven/AriaApi/images/download.svg)](https://bintray.com/arialyy/maven/AriaApi/_latestVersion) [![Download](https://api.bintray.com/packages/arialyy/maven/AriaCompiler/images/download.svg)](https://bintray.com/arialyy/maven/AriaCompiler/_latestVersion) ```java -compile 'com.arialyy.aria:aria-core:3.3.4' -annotationProcessor 'com.arialyy.aria:aria-compiler:3.3.4' +compile 'com.arialyy.aria:aria-core:3.3.5' +annotationProcessor 'com.arialyy.aria:aria-compiler:3.3.5' ``` *** diff --git a/app/src/main/java/com/arialyy/simple/download/multi_download/MultiTaskActivity.java b/app/src/main/java/com/arialyy/simple/download/multi_download/MultiTaskActivity.java index 3f33b8a5..fe422b61 100644 --- a/app/src/main/java/com/arialyy/simple/download/multi_download/MultiTaskActivity.java +++ b/app/src/main/java/com/arialyy/simple/download/multi_download/MultiTaskActivity.java @@ -67,7 +67,7 @@ public class MultiTaskActivity extends BaseActivity { break; case R.id.stop_all: Aria.download(this).stopAllTask(); - //Aria.download(this).removeAllTask(true); + //Aria.download(this).removeAllTask(false); break; case R.id.turn: startActivity(new Intent(this, MultiDownloadActivity.class)); diff --git a/build.gradle b/build.gradle index 75431c43..3a135894 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ task clean(type: Delete) { ext { userOrg = 'arialyy' groupId = 'com.arialyy.aria' - publishVersion = '3.3.4' + publishVersion = '3.3.5' // publishVersion = '1.0.3' //FTP插件 repoName='maven' desc = 'android 下载框架'