修复不支持断点的连接下载失败问题,https://github.com/AriaLyy/Aria/issues/771

pull/789/head
laoyuyu 4 years ago
parent 514fa4321d
commit 68c992962b
  1. 2
      DEV_LOG.md
  2. 7
      PublicComponent/src/main/java/com/arialyy/aria/core/loader/NormalTTBuilder.java
  3. 5
      app/src/main/java/com/arialyy/simple/core/download/HttpDownloadModule.java

@ -1,4 +1,6 @@
## 开发日志 ## 开发日志
+ v_3.8.15
- 修复不支持断点的连接下载失败问题,https://github.com/AriaLyy/Aria/issues/771
+ v_3.8.14 (2020/9/23) + v_3.8.14 (2020/9/23)
- 修复spi机制的兼容问题,https://github.com/AriaLyy/Aria/issues/743 - 修复spi机制的兼容问题,https://github.com/AriaLyy/Aria/issues/743
- 增加路径不可以写的判断,下载时,如果路径不可写,将执行失败回调 https://github.com/AriaLyy/Aria/issues/750 - 增加路径不可以写的判断,下载时,如果路径不可写,将执行失败回调 https://github.com/AriaLyy/Aria/issues/750

@ -70,12 +70,9 @@ public final class NormalTTBuilder implements IThreadTaskBuilder {
private List<IThreadTask> handleNoSupportBP() { private List<IThreadTask> handleNoSupportBP() {
List<IThreadTask> list = new ArrayList<>(); List<IThreadTask> list = new ArrayList<>();
mStartThreadNum = 1; mStartThreadNum = 1;
mRecord.isBlock = false;
mRecord.update();
IThreadTask task = createSingThreadTask(mRecord.threadRecords.get(0), 1); IThreadTask task = createSingThreadTask(mRecord.threadRecords.get(0), 1);
if (task == null) {
ALog.e(TAG, "创建线程任务失败");
return null;
}
list.add(task); list.add(task);
return list; return list;
} }

@ -51,9 +51,10 @@ public class HttpDownloadModule extends BaseViewModule {
//String url = AppUtil.getConfigValue(context, HTTP_URL_KEY, defUrl); //String url = AppUtil.getConfigValue(context, HTTP_URL_KEY, defUrl);
//String url = "http://fdfs.speedata.cn:9989/group1/M00/00/05/rBGFrl3fdAKAVJwfMtSa9R18wLU139.zip"; //String url = "http://fdfs.speedata.cn:9989/group1/M00/00/05/rBGFrl3fdAKAVJwfMtSa9R18wLU139.zip";
//String url = "http://9.9.9.28:8088/files/update.zip"; //String url = "http://9.9.9.28:8088/files/update.zip";
String url = "https://y.qq.com/download/import/QQMusic-import-1.2.1.zip"; //String url = "https://y.qq.com/download/import/QQMusic-import-1.2.1.zip";
String url = "https://gitee.com/huang-junhua/iptv/raw/master/guonei.m3u8";
//String url = "https://static.runoob.com/images/demo/demo2.jpg"; //String url = "https://static.runoob.com/images/demo/demo2.jpg";
String filePath = "/mnt/sdcard/update.zip"; String filePath = "/mnt/sdcard/xxx.m3u8";
singDownloadInfo = Aria.download(context).getFirstDownloadEntity(url); singDownloadInfo = Aria.download(context).getFirstDownloadEntity(url);
if (singDownloadInfo == null) { if (singDownloadInfo == null) {

Loading…
Cancel
Save