修复m3u8任务地址错误时,无法删除实体的问题 https://github.com/AriaLyy/Aria/issues/712
修复0kb的文件不可下载的问题 https://github.com/AriaLyy/Aria/issues/711
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- 修复m3u8任务地址错误时,无法删除实体的问题 https://github.com/AriaLyy/Aria/issues/712
|
||||
- 修复m3u8gzip的问题,https://github.com/AriaLyy/Aria/issues/639
|
||||
- 修复http表单上传,本地md5和上传的服务的的文件md5不一致的问题 https://github.com/AriaLyy/Aria/issues/730
|
||||
- 修复0kb的文件不可下载的问题 https://github.com/AriaLyy/Aria/issues/711
|
||||
- 增加m3u8密钥下载地址转换器增加ts列表的url地址 https://github.com/AriaLyy/Aria/issues/718
|
||||
- 增加现在http文件下载将使用HEAD请求获取文件大小,配置文件增加 <useHeadRequest value="true"/>
|
||||
- 增加允许不使用apt直接通过实现监听器来回调下载进度更新,该功能由[chenfei0928](https://github.com/chenfei0928)提交,感谢他的pr。如果注解不生效,只需要实现`DownloadListener`接口便可
|
||||
|
||||
@@ -232,6 +232,11 @@ final class HttpDFileInfoTask implements IInfoTask, Runnable {
|
||||
|| code == HttpURLConnection.HTTP_CREATED // 201 跳转
|
||||
|| code == 307) {
|
||||
handleUrlReTurn(conn, conn.getHeaderField("Location"));
|
||||
}else if (code == 416){ // 处理0k长度的文件的情况
|
||||
ALog.w(TAG, "文件长度为0,不支持断点");
|
||||
mTaskWrapper.setSupportBP(false);
|
||||
mTaskWrapper.setNewTask(true);
|
||||
end = true;
|
||||
} else if (code >= HttpURLConnection.HTTP_BAD_REQUEST) {
|
||||
failDownload(new AriaHTTPException(
|
||||
String.format("任务下载失败,errorCode:%s, url: %s", code, mEntity.getUrl())), false);
|
||||
|
||||
@@ -171,8 +171,7 @@ protected void onCreate(Bundle savedInstanceState) {
|
||||
有任何问题,可以在[issues](https://github.com/AriaLyy/Aria/issues)给我留言反馈。</br>
|
||||
在提交问题前,希望你已经查看过[wiki](https://aria.laoyuyu.me/aria_doc/)或搜索过[issues](https://github.com/AriaLyy/Aria/issues)。</br>
|
||||
|
||||
## 打赏
|
||||
如果觉得框架写的不错并且帮助到了你,可以请我瓶快乐水。`^_^`</br>
|
||||
## 请我喝瓶快乐水
|
||||
<img src="https://raw.githubusercontent.com/AriaLyy/Aria/master/img/ali_pay.png" width=336 height=336/>
|
||||
<img src="https://raw.githubusercontent.com/AriaLyy/Aria/master/img/wx_pay.png" width=336 height=336/>
|
||||
|
||||
|
||||
@@ -52,9 +52,10 @@ public class HttpDownloadModule extends BaseViewModule {
|
||||
//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://y.qq.com/download/import/QQMusic-import-1.2.1.zip";
|
||||
String url = "https://static.runoob.com/images/demo/demo2.jpg";
|
||||
//String url = "https://static.runoob.com/images/demo/demo2.jpg";
|
||||
String url = "https://22-1251738822.cos.ap-chengdu.myqcloud.com/1111111.docx";
|
||||
//String filePath = "/mnt/sdcard/update.mp4";
|
||||
String filePath = "/mnt/sdcard/update.jpg";
|
||||
String filePath = "/mnt/sdcard/xxx.docx";
|
||||
|
||||
singDownloadInfo = Aria.download(context).getFirstDownloadEntity(url);
|
||||
if (singDownloadInfo == null) {
|
||||
|
||||
@@ -248,6 +248,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
||||
//ALog.d(TAG, "文件md5: 9886e90f014d462b560dcec9c327bdb7");
|
||||
ALog.d(TAG, "下载完成的文件md5: " + CommonUtil.getFileMD5(new File(task.getFilePath())));
|
||||
getBinding().pl.setInfo(task.getEntity());
|
||||
getBinding().pl.setProgress(100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,6 +259,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
||||
|
||||
private void startD() {
|
||||
HttpOption option = new HttpOption();
|
||||
option.useServerFileName(true);
|
||||
option.addHeader("1", "@")
|
||||
.useServerFileName(true)
|
||||
.setFileLenAdapter(new FileLenAdapter());
|
||||
|
||||
@@ -34,7 +34,8 @@ public class M3U8VodModule extends BaseViewModule {
|
||||
// m3u8测试集合:http://www.voidcn.com/article/p-snaliarm-ct.html
|
||||
//private final String defUrl = "https://www.gaoya123.cn/2019/1557993797897.m3u8";
|
||||
// 多码率地址:
|
||||
private final String defUrl = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u811";
|
||||
//private final String defUrl = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8";
|
||||
private final String defUrl = "http://pp3zvsk2n.bkt.clouddn.com/20200806/sd/15967206011811803/38475fadd55e4ecea3.m3u8";
|
||||
//private final String defUrl = "http://youku.cdn7-okzy.com/20200123/16815_fbe419ed/index.m3u8";
|
||||
|
||||
//private final String defUrl = "https://cn7.kankia.com/hls/20200108/e1eaec074274c64fe46a3bdb5d2ba487/1578488360/index.m3u8";
|
||||
|
||||
Reference in New Issue
Block a user