diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java b/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java index 74f7eb8c..4dee42c4 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java @@ -67,6 +67,10 @@ public abstract class AbsFileer= mInitNum) { + if (mStopNum + mCompleteNum >= mInitNum) { closeTimer(false); mListener.onStop(mCurrentLocation); } diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java index b49a3189..6191e9e5 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java @@ -65,7 +65,7 @@ public class DownloadGroupUtil extends AbsGroupUtil implements IUtil { if (taskEntity != null) { if (taskEntity.getState() != IEntity.STATE_FAIL && taskEntity.getState() != IEntity.STATE_WAIT) { - startChildDownload(taskEntity); + createChildDownload(taskEntity); i++; } else { mInfoPool.execute(createFileInfoThread(taskEntity)); @@ -94,7 +94,7 @@ public class DownloadGroupUtil extends AbsGroupUtil implements IUtil { if (isNeedLoadFileSize) { mTotalSize += te.getEntity().getFileSize(); } - startChildDownload(te); + createChildDownload(te); } mInitNum++; if (mInitNum + mInitFailNum >= mTaskEntity.getEntity().getSubTask().size() diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/FtpDirDownloadUtil.java b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/FtpDirDownloadUtil.java index 0e5b2a15..a2c46894 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/FtpDirDownloadUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/FtpDirDownloadUtil.java @@ -60,7 +60,7 @@ public class FtpDirDownloadUtil extends AbsGroupUtil { for (String key : keys) { DownloadTaskEntity taskEntity = mExeMap.get(key); if (taskEntity != null) { - startChildDownload(taskEntity); + createChildDownload(taskEntity); i++; } } diff --git a/app/src/main/java/com/arialyy/simple/download/group/ChildHandleDialog.java b/app/src/main/java/com/arialyy/simple/download/group/ChildHandleDialog.java index 6de6feed..474557b1 100644 --- a/app/src/main/java/com/arialyy/simple/download/group/ChildHandleDialog.java +++ b/app/src/main/java/com/arialyy/simple/download/group/ChildHandleDialog.java @@ -86,7 +86,6 @@ import java.util.List; @DownloadGroup.onSubTaskRunning void onSubTaskRunning(DownloadGroupTask groupTask, DownloadEntity subEntity) { if (!subEntity.getUrl().equals(mChildEntity.getUrl())) return; - L.d(TAG, "p ==> " + subEntity.getPercent()); mPb.setProgress(subEntity.getPercent()); }