修复ftp服务器无法响应abor命令导致的无法停止上传的问题

修复ftp上传时,服务器有长度为0的文件导致上传失败的问题
修复下载任务和上传任务的文件路径是同一个时,导致的记录混乱问题
This commit is contained in:
laoyuyu
2019-12-17 22:04:21 +08:00
parent 0d93953cd9
commit 27c889e171
43 changed files with 295 additions and 145 deletions

View File

@@ -106,7 +106,7 @@ public class M3U8RecordAdapter extends AbsRecordHandlerAdapter {
tr.threadId = threadId;
tr.isComplete = false;
tr.startLocation = 0;
tr.threadType = TaskRecord.TYPE_M3U8_VOD;
tr.threadType = getEntity().getTaskType();
tr.tsUrl = mOption.getUrls().get(threadId);
return tr;
}
@@ -118,13 +118,7 @@ public class M3U8RecordAdapter extends AbsRecordHandlerAdapter {
record.threadRecords = new ArrayList<>();
record.threadNum = threadNum;
record.isBlock = true;
int requestType = getWrapper().getRequestType();
if (requestType == ITaskWrapper.M3U8_VOD) {
record.taskType = TaskRecord.TYPE_M3U8_VOD;
} else if (requestType == ITaskWrapper.M3U8_LIVE) {
record.taskType = TaskRecord.TYPE_M3U8_LIVE;
}
record.taskType = getEntity().getTaskType();
record.bandWidth = mOption.getBandWidth();
return record;
}

View File

@@ -169,7 +169,7 @@ public class M3U8LiveLoader extends BaseM3U8Loader {
record.taskKey = mRecord.filePath;
record.isComplete = false;
record.tsUrl = tsUrl;
record.threadType = TaskRecord.TYPE_M3U8_LIVE;
record.threadType = getEntity().getTaskType();
record.threadId = indexId;
mRecord.threadRecords.add(record);