fix bug https://github.com/AriaLyy/Aria/issues/542 fix bug https://github.com/AriaLyy/Aria/issues/547 修复下载失败时,中断重试无效的问题 增加忽略权限检查的api,`ignoreCheckPermissions()`
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.arialyy.aria.m3u8;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import com.arialyy.aria.core.common.RecordHandler;
|
||||
import com.arialyy.aria.core.download.DTaskWrapper;
|
||||
import com.arialyy.aria.core.download.DownloadEntity;
|
||||
@@ -59,6 +60,9 @@ public abstract class BaseM3U8Loader extends AbsLoader {
|
||||
|
||||
protected String getCacheDir() {
|
||||
String cacheDir = mM3U8Option.getCacheDir();
|
||||
if (TextUtils.isEmpty(cacheDir)) {
|
||||
cacheDir = FileUtil.getTsCacheDir(getEntity().getFilePath(), mM3U8Option.getBandWidth());
|
||||
}
|
||||
if (!new File(cacheDir).exists()) {
|
||||
FileUtil.createDir(cacheDir);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,8 @@ public class M3U8RecordAdapter extends AbsRecordHandlerAdapter {
|
||||
|
||||
@Override public int initTaskThreadNum() {
|
||||
if (getWrapper().getRequestType() == ITaskWrapper.M3U8_VOD) {
|
||||
return mOption.getUrls().size();
|
||||
return
|
||||
mOption.getUrls() == null || mOption.getUrls().isEmpty() ? 1 : mOption.getUrls().size();
|
||||
}
|
||||
if (getWrapper().getRequestType() == ITaskWrapper.M3U8_LIVE) {
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user