From 0a6e12fe6cb00e292ba36cba3907c6a2f136ef78 Mon Sep 17 00:00:00 2001 From: AriaLyy <511455842@qq.com> Date: Tue, 10 Oct 2017 22:02:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9A=82=E5=81=9C=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Aria/build.gradle | 4 ++-- .../main/java/com/arialyy/aria/core/common/AbsFileer.java | 6 ++++-- .../java/com/arialyy/aria/core/download/DownloadTarget.java | 1 - .../java/com/arialyy/aria/core/scheduler/AbsSchedulers.java | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Aria/build.gradle b/Aria/build.gradle index 7f47d267..4928c583 100644 --- a/Aria/build.gradle +++ b/Aria/build.gradle @@ -23,8 +23,8 @@ dependencies { testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile project(':AriaAnnotations') - compile 'com.arialyy.aria:aria-ftp-plug:1.0.1' -// compile project(':AriaFtpPlug') +// compile 'com.arialyy.aria:aria-ftp-plug:1.0.1' + compile project(':AriaFtpPlug') } apply from: 'bintray-release.gradle' 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 ed7a56b5..86e2c7dc 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 @@ -325,9 +325,11 @@ public abstract class AbsFileer= 0) { Long r = Long.parseLong(record + ""); - mConstance.CURRENT_LOCATION += r - startL; + if (r > startL) { + mConstance.CURRENT_LOCATION += r - startL; + startL = r; + } Log.d(TAG, "任务【" + mEntity.getFileName() + "】线程__" + i + "__恢复下载"); - startL = r; recordL[rl] = i; rl++; } else { diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/DownloadTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/DownloadTarget.java index c8423d3e..c5f466f3 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/DownloadTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/DownloadTarget.java @@ -74,7 +74,6 @@ public class DownloadTarget entity.save(); mTaskEntity.save(); } - mEntity = mTaskEntity.entity; } diff --git a/Aria/src/main/java/com/arialyy/aria/core/scheduler/AbsSchedulers.java b/Aria/src/main/java/com/arialyy/aria/core/scheduler/AbsSchedulers.java index 2704e55b..65d6acdb 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/scheduler/AbsSchedulers.java +++ b/Aria/src/main/java/com/arialyy/aria/core/scheduler/AbsSchedulers.java @@ -154,6 +154,7 @@ abstract class AbsSchedulers