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 01d2fb9f..54690796 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 @@ -63,7 +63,6 @@ public abstract class AbsFileer= 0) { Long r = Long.parseLong(record + ""); - if (r > startL) { + //记录的位置需要在线程区间中 + if (startL < r && r < (i == (mTotalThreadNum - 1) ? fileLength : endL)) { mConstance.CURRENT_LOCATION += r - startL; startL = r; } - ALog.d(TAG, "任务【" + mEntity.getFileName() + "】线程__" + i + "__恢复"); + ALog.d(TAG, "任务【" + mEntity.getFileName() + "】线程__" + i + "__恢复下载"); recordL[rl] = i; rl++; } else { @@ -380,7 +367,7 @@ public abstract class AbsFileer 0) { @@ -405,7 +392,7 @@ public abstract class AbsFileer config = new SubThreadConfig<>(); diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/StateConstance.java b/Aria/src/main/java/com/arialyy/aria/core/common/StateConstance.java index 386c55f0..e42e3f86 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/StateConstance.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/StateConstance.java @@ -63,7 +63,7 @@ public class StateConstance { * 所有子线程是否都已经完成下载 */ public boolean isComplete() { - return COMPLETE_THREAD_NUM == THREAD_NUM; + return COMPLETE_THREAD_NUM >= THREAD_NUM; } /**