增加立即恢复任务的接口,正常来说,当执行队列满时,调用恢复任务接口,只能将任务放到缓存队列中。如果希望调用恢复接口,马上进入执行队列,需要调用resume(true)这个重载方法。
修复一个非分块模式下,无法恢复下载的问题 增加M3U8加密密钥的下载地址转换器 https://github.com/AriaLyy/Aria/issues/522
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
3、只对新的多线程下载任务有效
|
||||
4、只对多线程的任务有效
|
||||
-->
|
||||
<useBlock value="true"/>
|
||||
<useBlock value="false"/>
|
||||
|
||||
<!--设置下载线程数,下载线程数不能小于1
|
||||
注意:
|
||||
|
||||
@@ -51,8 +51,8 @@ public class HttpDownloadModule extends BaseViewModule {
|
||||
//String url = AppUtil.getConfigValue(context, HTTP_URL_KEY, defUrl);
|
||||
//String url =
|
||||
// "http://sdkdown.muzhiwan.com/openfile/2019/05/21/com.netease.tom.mzw_5ce3ef8754d05.apk";
|
||||
//String url = "http://image.totwoo.com/totwoo-TOTWOO-v3.5.6.apk";
|
||||
String url = "https://imtt.dd.qq.com/16891/apk/70BFFDB05AB8686F2A4CF3E07588A377.apk?fsname=com.tencent.tmgp.speedmobile_1.16.0.33877_1160033877.apk&csr=1bbd";
|
||||
String url = "http://image.totwoo.com/totwoo-TOTWOO-v3.5.6.apk";
|
||||
//String url = "https://imtt.dd.qq.com/16891/apk/70BFFDB05AB8686F2A4CF3E07588A377.apk?fsname=com.tencent.tmgp.speedmobile_1.16.0.33877_1160033877.apk&csr=1bbd";
|
||||
//String url = "https://ss1.baidu.com/-4o3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=a9e671b9a551f3dedcb2bf64a4eff0ec/4610b912c8fcc3cef70d70409845d688d53f20f7.jpg";
|
||||
String filePath = AppUtil.getConfigValue(context, HTTP_PATH_KEY, defFilePath);
|
||||
|
||||
|
||||
@@ -276,8 +276,9 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
||||
if (Aria.download(this).load(mTaskId).isRunning()) {
|
||||
Aria.download(this).load(mTaskId).stop();
|
||||
} else {
|
||||
mUrl = "http://sdkdown.muzhiwan.com/openfile/2019/07/11/com.netease.syfz.mzw_5d26f8d9cee27.apk";
|
||||
Aria.download(this).load(mTaskId)
|
||||
.updateUrl("http://sdkdown.muzhiwan.com/openfile/2019/07/11/com.netease.syfz.mzw_5d26f8d9cee27.apk")
|
||||
.updateUrl(mUrl)
|
||||
.resume();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -307,17 +307,17 @@ public class DownloadAdapter extends AbsRVAdapter<AbsEntity, DownloadAdapter.Sim
|
||||
switch (entity.getTaskType()) {
|
||||
case ITaskWrapper.D_FTP:
|
||||
//Aria.download(getContext()).loadFtp((DownloadEntity) entity).login("lao", "123456").create();
|
||||
Aria.download(getContext()).loadFtp(entity.getId()).resume();
|
||||
Aria.download(getContext()).loadFtp(entity.getId()).resume(true);
|
||||
break;
|
||||
case ITaskWrapper.D_FTP_DIR:
|
||||
Aria.download(getContext()).loadFtpDir(entity.getId()).resume();
|
||||
Aria.download(getContext()).loadFtpDir(entity.getId()).resume(true);
|
||||
break;
|
||||
case ITaskWrapper.D_HTTP:
|
||||
case ITaskWrapper.M3U8_VOD:
|
||||
Aria.download(getContext()).load(entity.getId()).resume();
|
||||
Aria.download(getContext()).load(entity.getId()).resume(true);
|
||||
break;
|
||||
case ITaskWrapper.DG_HTTP:
|
||||
Aria.download(getContext()).loadGroup(entity.getId()).resume();
|
||||
Aria.download(getContext()).loadGroup(entity.getId()).resume(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user