This commit is contained in:
@@ -98,9 +98,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
}
|
||||
|
||||
public static AriaManager getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
throw new NullPointerException("请使用AriaManager.init(context)初始化管理器");
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
## 开发日志
|
||||
+ v_3.7.9 (2019/11/28)
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/537
|
||||
+ v_3.7.8 (2019/11/28)
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/526
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/533
|
||||
|
||||
28
README.md
28
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.8'
|
||||
annotationProcessor 'com.arialyy.aria:compiler:3.7.8'
|
||||
implementation 'com.arialyy.aria:ftpComponent:3.7.8' # 如果需要使用ftp,请增加该组件
|
||||
implementation 'com.arialyy.aria:m3u8Component:3.7.8' # 如果需要使用m3u8下载功能,请增加该组件
|
||||
implementation 'com.arialyy.aria:core:3.7.9'
|
||||
annotationProcessor 'com.arialyy.aria:compiler:3.7.9'
|
||||
implementation 'com.arialyy.aria:ftpComponent:3.7.9' # 如果需要使用ftp,请增加该组件
|
||||
implementation 'com.arialyy.aria:m3u8Component:3.7.9' # 如果需要使用m3u8下载功能,请增加该组件
|
||||
```
|
||||
如果出现android support依赖错误,请将 `compile 'com.arialyy.aria:core:<last-version>'`替换为
|
||||
```
|
||||
@@ -137,15 +137,9 @@ protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
|
||||
### 版本日志
|
||||
+ v_3.7.8 (2019/11/28)
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/526
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/533
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/535
|
||||
- 修复ftp无法完成下载的问题
|
||||
- 修复一个非分块模式下,调用`updateUrl(newUrl)`后无法恢复下载的问题
|
||||
- 增加立即恢复任务的接口,正常来说,当执行队列满时,调用恢复任务接口,只能将任务放到缓存队列中。如果希望调用恢复接口,马上进入执行队列,需要调用`resume(true)`这个重载方法。
|
||||
- 增加M3U8加密密钥的下载地址转换器 https://github.com/AriaLyy/Aria/issues/522
|
||||
|
||||
+ v_3.7.9 (2019/11/28)
|
||||
- fix bug https://github.com/AriaLyy/Aria/issues/537
|
||||
|
||||
[更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md)
|
||||
|
||||
## 混淆配置
|
||||
|
||||
@@ -72,6 +72,8 @@ dependencies {
|
||||
implementation project(':M3U8Component')
|
||||
implementation project(':FtpComponent')
|
||||
implementation project(path: ':AriaAnnotations')
|
||||
|
||||
debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
@@ -34,7 +34,7 @@ public class BaseApplication extends Application {
|
||||
super.onCreate();
|
||||
INSTANCE = this;
|
||||
AbsFrame.init(this);
|
||||
Aria.init(this);
|
||||
//Aria.init(this);
|
||||
if (BuildConfig.DEBUG) {
|
||||
//StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
|
||||
// .detectAll()
|
||||
|
||||
@@ -49,6 +49,7 @@ public class M3U8LiveDLoadActivity extends BaseActivity<ActivityM3u8LiveBinding>
|
||||
private String mFilePath;
|
||||
private M3U8LiveModule mModule;
|
||||
private DownloadEntity mEntity;
|
||||
private long mTaskId;
|
||||
|
||||
@Override
|
||||
protected void init(Bundle savedInstanceState) {
|
||||
@@ -63,6 +64,7 @@ public class M3U8LiveDLoadActivity extends BaseActivity<ActivityM3u8LiveBinding>
|
||||
return;
|
||||
}
|
||||
mEntity = entity;
|
||||
mTaskId = mEntity.getId();
|
||||
getBinding().setStateStr(getString(R.string.start));
|
||||
getBinding().setUrl(entity.getUrl());
|
||||
getBinding().setFilePath(entity.getFilePath());
|
||||
@@ -213,22 +215,23 @@ public class M3U8LiveDLoadActivity extends BaseActivity<ActivityM3u8LiveBinding>
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.start:
|
||||
if (Aria.download(this).load(mEntity.getId()).isRunning()) {
|
||||
if (Aria.download(this).load(mTaskId).isRunning()) {
|
||||
Aria.download(this).load(mEntity.getId()).stop();
|
||||
} else {
|
||||
startD();
|
||||
}
|
||||
break;
|
||||
case R.id.cancel:
|
||||
if (AppUtil.chekEntityValid(mEntity)) {
|
||||
if (mTaskId != -1){
|
||||
Aria.download(this).load(mEntity.getId()).cancel(true);
|
||||
mTaskId = -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void startD() {
|
||||
Aria.download(M3U8LiveDLoadActivity.this)
|
||||
mTaskId = Aria.download(M3U8LiveDLoadActivity.this)
|
||||
.load(mUrl)
|
||||
.setFilePath(mFilePath, true)
|
||||
.m3u8LiveOption(getLiveoption())
|
||||
|
||||
@@ -44,8 +44,8 @@ task clean(type: Delete) {
|
||||
}
|
||||
|
||||
ext {
|
||||
versionCode = 378
|
||||
versionName = '3.7.8'
|
||||
versionCode = 379
|
||||
versionName = '3.7.9'
|
||||
userOrg = 'arialyy'
|
||||
groupId = 'com.arialyy.aria'
|
||||
publishVersion = versionName
|
||||
|
||||
Reference in New Issue
Block a user