移除`DownloadGroupEntity`字段`groupHash`的主键约束,`DownloadEntity`字段`groupHash`的外键约束,`TaskRecord`字段`dGroupHash`的外键约束
优化关联查询的性能
This commit is contained in:
laoyuyu
2019-06-11 19:17:28 +08:00
parent b670e3e383
commit 8f8f8fa7d7
27 changed files with 281 additions and 240 deletions

View File

@@ -34,7 +34,7 @@ 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://ivi.bupt.edu.cn/hls/cctv6hd.m3u8";
private final String defUrl = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8";
private final String filePath =
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath()
+ "/1557993797897.ts";

View File

@@ -73,6 +73,7 @@ final class FileListAdapter extends AbsRVAdapter<FileListEntity, FileListAdapter
.setSubFileName(Arrays.asList(item.names))
.setDirPath(item.downloadPath)
.setGroupAlias(item.name)
.unknownSize()
.start();
} else {
Aria.download(getContext())

View File

@@ -136,6 +136,9 @@ public class MultiTaskActivity extends BaseActivity<ActivityMultiBinding> {
}
@DownloadGroup.onTaskFail void groupTaskFail(DownloadGroupTask task) {
if (task == null){
return;
}
mAdapter.updateBtState(task.getKey(), true);
Log.d(TAG, String.format("group【%s】fail", task.getTaskName()));
}