m3u8使用`ignoreFailureTs`后将不会自动重试失败的切片 https://github.com/AriaLyy/Aria/issues/662
This commit is contained in:
laoyuyu
2020-08-13 21:06:06 +08:00
parent ff0796c580
commit 86aeac0ad8
10 changed files with 25 additions and 18 deletions

View File

@@ -49,21 +49,12 @@ public class HttpDownloadModule extends BaseViewModule {
*/
LiveData<DownloadEntity> getHttpDownloadInfo(Context context) {
//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 = "http://fdfs.speedata.cn:9989/group1/M00/00/05/rBGFrl3fdAKAVJwfMtSa9R18wLU139.zip";
//String url = "http://9.9.9.28:8088/files/update.zip";
//String url = "https://ss1.baidu.com/-4o3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=a9e671b9a551f3dedcb2bf64a4eff0ec/4610b912c8fcc3cef70d70409845d688d53f20f7.jpg";
//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);
String url = "https://y.qq.com/download/import/QQMusic-import-1.2.1.zip";
//String url = "https://video-hkt1-1.xx.fbcdn.net/v/t42.9040-2/89465702_658301101378505_5469280744218034176_n.mp4?_nc_cat=107&_nc_sid=985c63&efg=eyJ2ZW5jb2RlX3RhZyI6ImxlZ2FjeV9zZCJ9&_nc_oc=AQmzYwQG9vccyqr7S44-cfHc4wJ9010O1nvspG2DPV4cTct1pLrjKl1e1UmOJV99bJw&_nc_ht=video-hkt1-1.xx&oh=49bd04435aaa8b4459b8d5cb7d1e7c79&oe=5E672E37";
//String url = "http://donuts.aigauss.com/doc_fPhW2DBGj3_1578932414.png";
String filePath = "/mnt/sdcard/update.mp4";
//String url = "https://dhfspace.360drm.com/1_12809_1543904946_VID_20180808_212829.vep?e=1578554567&token=gUBmfZgZS5wy4wdQIDZG8UVxlNCyVSjvksIb13K5:WYSZRgmLbH1_9hjgqOAGmqR27JM=";
//String filePath = "/mnt/sdcard/sssss.zip";
//String url = "https://y.qq.com/download/import/QQMusic-import-1.2.1.zip";
String url = "https://static.runoob.com/images/demo/demo2.jpg";
//String filePath = "/mnt/sdcard/update.mp4";
String filePath = "/mnt/sdcard/update.jpg";
singDownloadInfo = Aria.download(context).getFirstDownloadEntity(url);
if (singDownloadInfo == null) {

View File

@@ -161,6 +161,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
if (speed > -1) {
msg = item.getTitle().toString();
T.showShort(this, msg);
Aria.get(this).getDownloadConfig().setMaxSpeed(speed);
}
return true;
}
@@ -244,7 +245,8 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
if (task.getKey().equals(mUrl)) {
Toast.makeText(SingleTaskActivity.this, getString(R.string.download_success),
Toast.LENGTH_SHORT).show();
ALog.d(TAG, "md5: " + CommonUtil.getFileMD5(new File(task.getFilePath())));
ALog.d(TAG, "文件md5: 9886e90f014d462b560dcec9c327bdb7");
ALog.d(TAG, "下载完成的文件md5: " + CommonUtil.getFileMD5(new File(task.getFilePath())));
getBinding().pl.setInfo(task.getEntity());
}
}