diff --git a/DEV_LOG.md b/DEV_LOG.md
index f7a2cc03..44712ecc 100644
--- a/DEV_LOG.md
+++ b/DEV_LOG.md
@@ -1,4 +1,7 @@
## 开发日志
+ + v_3.8.7
+ - 修复组合任务单个子任务失败后,重新恢复组合任务,组合任务状态变为完成的问题
+
+ v_3.8.6 (2020/2/17)
- fix bug https://github.com/AriaLyy/Aria/issues/608
- fix bug https://github.com/AriaLyy/Aria/issues/579#issuecomment-586665035
diff --git a/PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHandler.java b/PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHandler.java
index cf8bdbd5..8e5f0c1e 100644
--- a/PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHandler.java
+++ b/PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHandler.java
@@ -30,6 +30,7 @@ import com.arialyy.aria.util.CommonUtil;
import com.arialyy.aria.util.DbDataHelper;
import com.arialyy.aria.util.FileUtil;
import java.io.File;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
@@ -84,6 +85,11 @@ public abstract class RecordHandler implements IRecordHandler {
mTaskRecord = DbDataHelper.getTaskRecord(getFilePath(), mEntity.getTaskType());
if (mTaskRecord == null) {
initRecord(true);
+ }else if (mTaskRecord.threadRecords == null || mTaskRecord.threadRecords.size() == 0){
+ if (mTaskRecord.threadRecords == null){
+ mTaskRecord.threadRecords = new ArrayList<>();
+ }
+ initRecord(false);
}
handlerTaskRecord(mTaskRecord);
}
diff --git a/PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHelper.java b/PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHelper.java
index 9942ff89..63b4200b 100644
--- a/PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHelper.java
+++ b/PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHelper.java
@@ -174,7 +174,7 @@ public class RecordHelper {
tr.startLocation = 0;
tr.isComplete = false;
tr.endLocation = mWrapper.getEntity().getFileSize();
- } else if (file.length() == mWrapper.getEntity().getFileSize()) {
+ } else if (file.length() != 0 && file.length() == mWrapper.getEntity().getFileSize()) {
ALog.d(TAG, "文件长度一致,线程完成");
tr.isComplete = true;
} else {
diff --git a/app/src/main/assets/aria_config.xml b/app/src/main/assets/aria_config.xml
index 56a3067d..26626b21 100644
--- a/app/src/main/assets/aria_config.xml
+++ b/app/src/main/assets/aria_config.xml
@@ -131,7 +131,7 @@
-
+
diff --git a/app/src/main/java/com/arialyy/simple/core/download/group/DownloadGroupActivity.java b/app/src/main/java/com/arialyy/simple/core/download/group/DownloadGroupActivity.java
index 193080d2..b27f5231 100644
--- a/app/src/main/java/com/arialyy/simple/core/download/group/DownloadGroupActivity.java
+++ b/app/src/main/java/com/arialyy/simple/core/download/group/DownloadGroupActivity.java
@@ -163,8 +163,11 @@ public class DownloadGroupActivity extends BaseActivity urls = new ArrayList<>();
//urls.add("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1574141924275&di=a7ea1497a4a2528a45ce7103bf61adf4&imgtype=0&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fc2cec3fdfc03924590b2a9b58d94a4c27d1e2500.jpg");
//urls.add("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1574141924272&di=7861479e7cb3cea98d585eaf108f056f&imgtype=0&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F562c11dfa9ec8a13c0741f5afd03918fa0ecc01a.jpg");
- String[] str = getContext().getResources().getStringArray(R.array.group_urls_1);
- Collections.addAll(urls, str);
+ //String[] str = getContext().getResources().getStringArray(R.array.group_urls_1);
+ //Collections.addAll(urls, str);
+ urls.add("http://img2.imgtn.bdimg.com/it/u=3105600238,693167464&fm=26&gp=0.jpg");
+ urls.add("http://a4.att.hudong.com/22/59/19300001325156131228593878903.jpg");
+ urls.add("http://pic1.win4000.com/mobile/2019-12-16/5df71dc866a0c.jpg");
+ urls.add("http://pics4.baidu.com/feed/e824b899a9014c08545e5585620d360e7bf4f421.jpeg");
+ urls.add("http://img.blog.163.com/photo/iFUKcs6shB4PNlfxwH-yTw==/2542563464627686395.jpg");
+
return urls;
}
@@ -49,8 +55,13 @@ public class GroupModule extends BaseModule {
List getSubName() {
List names = new ArrayList<>();
- String[] str = getContext().getResources().getStringArray(R.array.group_names);
- Collections.addAll(names, str);
+ //String[] str = getContext().getResources().getStringArray(R.array.group_names);
+ //Collections.addAll(names, str);
+ names.add("1.png");
+ names.add("2.png");
+ names.add("3.png");
+ names.add("4.png");
+ names.add("5.png");
return names;
}