3.7.7
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
## 开发日志
|
||||
+ v_3.7.7 (2019/11/20)
|
||||
- 修复ftp无法完成下载的问题
|
||||
- 修复一个http下载崩溃的问题
|
||||
+ v_3.7.6 (2019/11/19)
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/505
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/516
|
||||
|
||||
@@ -34,10 +34,6 @@ public abstract class AbsThreadTaskAdapter implements IThreadTaskAdapter {
|
||||
* 速度限制工具
|
||||
*/
|
||||
protected BandwidthLimiter mSpeedBandUtil;
|
||||
/**
|
||||
* 当前线程的下去区间的进度
|
||||
*/
|
||||
private long mRangeProgress;
|
||||
private ThreadRecord mThreadRecord;
|
||||
private IThreadTaskObserver mObserver;
|
||||
private AbsTaskWrapper mWrapper;
|
||||
@@ -48,7 +44,6 @@ public abstract class AbsThreadTaskAdapter implements IThreadTaskAdapter {
|
||||
mThreadRecord = config.record;
|
||||
mWrapper = config.taskWrapper;
|
||||
mThreadConfig = config;
|
||||
mRangeProgress = mThreadRecord.startLocation;
|
||||
if (getTaskConfig().getMaxSpeed() > 0) {
|
||||
mSpeedBandUtil = new BandwidthLimiter(getTaskConfig().getMaxSpeed(), config.startThreadNum);
|
||||
}
|
||||
@@ -68,7 +63,7 @@ public abstract class AbsThreadTaskAdapter implements IThreadTaskAdapter {
|
||||
* 当前线程的下去区间的进度
|
||||
*/
|
||||
protected long getRangeProgress() {
|
||||
return mRangeProgress;
|
||||
return mObserver.getThreadProgress();
|
||||
}
|
||||
|
||||
protected ThreadRecord getThreadRecord() {
|
||||
|
||||
@@ -53,4 +53,9 @@ public interface IThreadTaskObserver {
|
||||
* @param len 新增的长度
|
||||
*/
|
||||
void updateProgress(long len);
|
||||
|
||||
/**
|
||||
* 获取线程当前进度
|
||||
*/
|
||||
long getThreadProgress();
|
||||
}
|
||||
|
||||
@@ -318,6 +318,11 @@ public class ThreadTask implements IThreadTask, IThreadTaskObserver {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getThreadProgress() {
|
||||
return mRangeProgress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消任务
|
||||
*/
|
||||
|
||||
@@ -101,9 +101,6 @@ public class ComponentUtil {
|
||||
public <T extends IUtil> T buildUtil(AbsTaskWrapper wrapper, IEventListener listener) {
|
||||
int requestType = wrapper.getRequestType();
|
||||
String className = null;
|
||||
if (requestType == 1){
|
||||
throw new IllegalArgumentException("xxxx");
|
||||
}
|
||||
switch (requestType) {
|
||||
case ITaskWrapper.M3U8_LIVE:
|
||||
className = "com.arialyy.aria.m3u8.live.M3U8LiveUtil";
|
||||
|
||||
27
README.md
27
README.md
@@ -44,16 +44,16 @@ Aria有以下特点:
|
||||
|
||||
## 引入库
|
||||
[](https://github.com/AriaLyy/Aria/blob/master/LICENSE)
|
||||
[](https://github.com/AriaLyy/Aria)
|
||||
[](https://github.com/AriaLyy/Aria)
|
||||
[](https://github.com/AriaLyy/Aria)
|
||||
[](https://github.com/AriaLyy/Aria)
|
||||
[](https://github.com/AriaLyy/Aria)
|
||||
[](https://github.com/AriaLyy/Aria)
|
||||
[](https://github.com/AriaLyy/Aria)
|
||||
[](https://github.com/AriaLyy/Aria)
|
||||
|
||||
```java
|
||||
implementation 'com.arialyy.aria:core:3.7.6'
|
||||
annotationProcessor 'com.arialyy.aria:compiler:3.7.6'
|
||||
implementation 'com.arialyy.aria:ftpComponent:3.7.6' # 如果需要使用ftp,请增加该组件
|
||||
implementation 'com.arialyy.aria:m3u8Component:3.7.6' # 如果需要使用m3u8下载功能,请增加该组件
|
||||
implementation 'com.arialyy.aria:core:3.7.7'
|
||||
annotationProcessor 'com.arialyy.aria:compiler:3.7.7'
|
||||
implementation 'com.arialyy.aria:ftpComponent:3.7.7' # 如果需要使用ftp,请增加该组件
|
||||
implementation 'com.arialyy.aria:m3u8Component:3.7.7' # 如果需要使用m3u8下载功能,请增加该组件
|
||||
```
|
||||
如果出现android support依赖错误,请将 `compile 'com.arialyy.aria:core:<last-version>'`替换为
|
||||
```
|
||||
@@ -137,14 +137,9 @@ protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
|
||||
### 版本日志
|
||||
+ v_3.7.6 (2019/11/19)
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/505
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/516
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/515
|
||||
- 增加强制上传的api`forceUpload()`
|
||||
- 修复for循环上传文件出现的问题
|
||||
- 移除创建任务的500ms间隔限制
|
||||
- 修复多线程读写时可能出现的`database is locked`的问题
|
||||
+ v_3.7.7 (2019/11/20)
|
||||
- 修复ftp无法完成下载的问题
|
||||
- 修复一个http下载崩溃的问题
|
||||
|
||||
[更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md)
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ task clean(type: Delete) {
|
||||
}
|
||||
|
||||
ext {
|
||||
versionCode = 376
|
||||
versionName = '3.7.6'
|
||||
versionCode = 377
|
||||
versionName = '3.7.7'
|
||||
userOrg = 'arialyy'
|
||||
groupId = 'com.arialyy.aria'
|
||||
publishVersion = versionName
|
||||
|
||||
Reference in New Issue
Block a user