增加m3u8密钥url转换器

pull/617/head 3.7.8
laoyuyu 5 years ago
parent c4cc804c67
commit ee5ee6e080
  1. 3
      DEV_LOG.md
  2. 4
      M3U8Component/src/main/java/com/arialyy/aria/m3u8/M3U8InfoThread.java
  3. 2
      PublicComponent/src/main/java/com/arialyy/aria/core/TaskOptionParams.java
  4. 24
      README.md
  5. 2
      app/src/main/assets/aria_config.xml
  6. 10
      app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodDLoadActivity.java
  7. 2
      build.gradle

@ -1,9 +1,10 @@
## 开发日志 ## 开发日志
+ v_3.7.8 + v_3.7.8 (2019/11/28)
- fix bug https://github.com/AriaLyy/Aria/issues/526 - 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/533
- fix bug https://github.com/AriaLyy/Aria/issues/535 - fix bug https://github.com/AriaLyy/Aria/issues/535
- 修复ftp无法完成下载的问题 - 修复ftp无法完成下载的问题
- 修复一个非分块模式下,调用`updateUrl(newUrl)`后无法恢复下载的问题
- 增加立即恢复任务的接口,正常来说,当执行队列满时,调用恢复任务接口,只能将任务放到缓存队列中。如果希望调用恢复接口,马上进入执行队列,需要调用`resume(true)`这个重载方法。 - 增加立即恢复任务的接口,正常来说,当执行队列满时,调用恢复任务接口,只能将任务放到缓存队列中。如果希望调用恢复接口,马上进入执行队列,需要调用`resume(true)`这个重载方法。
- 增加M3U8加密密钥的下载地址转换器 https://github.com/AriaLyy/Aria/issues/522 - 增加M3U8加密密钥的下载地址转换器 https://github.com/AriaLyy/Aria/issues/522
+ v_3.7.7 (2019/11/20) + v_3.7.7 (2019/11/20)

@ -360,6 +360,10 @@ final public class M3U8InfoThread implements Runnable {
if (keyUrlConverter != null) { if (keyUrlConverter != null) {
keyUrl = keyUrlConverter.convert(keyUrl); keyUrl = keyUrlConverter.convert(keyUrl);
} }
if (TextUtils.isEmpty(keyUrl)){
ALog.e(TAG, "m3u8密钥key url 为空");
return;
}
URL url = ConnectionHelp.handleUrl(keyUrl, mHttpOption); URL url = ConnectionHelp.handleUrl(keyUrl, mHttpOption);
conn = ConnectionHelp.handleConnection(url, mHttpOption); conn = ConnectionHelp.handleConnection(url, mHttpOption);

@ -22,6 +22,7 @@ import com.arialyy.aria.core.processor.FtpInterceptHandler;
import com.arialyy.aria.core.processor.IBandWidthUrlConverter; import com.arialyy.aria.core.processor.IBandWidthUrlConverter;
import com.arialyy.aria.core.processor.IFtpUploadInterceptor; import com.arialyy.aria.core.processor.IFtpUploadInterceptor;
import com.arialyy.aria.core.processor.IHttpFileLenAdapter; import com.arialyy.aria.core.processor.IHttpFileLenAdapter;
import com.arialyy.aria.core.processor.IKeyUrlConverter;
import com.arialyy.aria.core.processor.ILiveTsUrlConverter; import com.arialyy.aria.core.processor.ILiveTsUrlConverter;
import com.arialyy.aria.core.processor.ITsMergeHandler; import com.arialyy.aria.core.processor.ITsMergeHandler;
import com.arialyy.aria.core.processor.IVodTsUrlConverter; import com.arialyy.aria.core.processor.IVodTsUrlConverter;
@ -61,6 +62,7 @@ public class TaskOptionParams {
PROCESSORES.add(ILiveTsUrlConverter.class); PROCESSORES.add(ILiveTsUrlConverter.class);
PROCESSORES.add(ITsMergeHandler.class); PROCESSORES.add(ITsMergeHandler.class);
PROCESSORES.add(IVodTsUrlConverter.class); PROCESSORES.add(IVodTsUrlConverter.class);
PROCESSORES.add(IKeyUrlConverter.class);
} }
/** /**

@ -44,16 +44,16 @@ Aria有以下特点:
## 引入库 ## 引入库
[![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/AriaLyy/Aria/blob/master/LICENSE) [![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/AriaLyy/Aria/blob/master/LICENSE)
[![Core](https://img.shields.io/badge/Core-3.7.8-pre-1-blue)](https://github.com/AriaLyy/Aria) [![Core](https://img.shields.io/badge/Core-3.7.8-blue)](https://github.com/AriaLyy/Aria)
[![Compiler](https://img.shields.io/badge/Compiler-3.7.8-pre-1-blue)](https://github.com/AriaLyy/Aria) [![Compiler](https://img.shields.io/badge/Compiler-3.7.8-blue)](https://github.com/AriaLyy/Aria)
[![FtpComponent](https://img.shields.io/badge/FtpComponent-3.7.8-pre-1-orange)](https://github.com/AriaLyy/Aria) [![FtpComponent](https://img.shields.io/badge/FtpComponent-3.7.8-orange)](https://github.com/AriaLyy/Aria)
[![M3U8Component](https://img.shields.io/badge/M3U8Component-3.7.8-pre-1-orange)](https://github.com/AriaLyy/Aria) [![M3U8Component](https://img.shields.io/badge/M3U8Component-3.7.8-orange)](https://github.com/AriaLyy/Aria)
```java ```java
implementation 'com.arialyy.aria:core:3.7.8-pre-3' implementation 'com.arialyy.aria:core:3.7.8'
annotationProcessor 'com.arialyy.aria:compiler:3.7.8-pre-3' annotationProcessor 'com.arialyy.aria:compiler:3.7.8'
implementation 'com.arialyy.aria:ftpComponent:3.7.8-pre-3' # 如果需要使用ftp,请增加该组件 implementation 'com.arialyy.aria:ftpComponent:3.7.8' # 如果需要使用ftp,请增加该组件
implementation 'com.arialyy.aria:m3u8Component:3.7.8-pre-3' # 如果需要使用m3u8下载功能,请增加该组件 implementation 'com.arialyy.aria:m3u8Component:3.7.8' # 如果需要使用m3u8下载功能,请增加该组件
``` ```
如果出现android support依赖错误,请将 `compile 'com.arialyy.aria:core:<last-version>'`替换为 如果出现android support依赖错误,请将 `compile 'com.arialyy.aria:core:<last-version>'`替换为
``` ```
@ -137,8 +137,14 @@ protected void onCreate(Bundle savedInstanceState) {
### 版本日志 ### 版本日志
+ v_3.7.8-pre-1 (2019/11/20) + v_3.7.8 (2019/11/28)
- fix bug https://github.com/AriaLyy/Aria/issues/526 - 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
[更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md) [更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md)

@ -32,7 +32,7 @@
3、只对新的多线程下载任务有效 3、只对新的多线程下载任务有效
4、只对多线程的任务有效 4、只对多线程的任务有效
--> -->
<useBlock value="false"/> <useBlock value="true"/>
<!--设置下载线程数,下载线程数不能小于1 <!--设置下载线程数,下载线程数不能小于1
注意: 注意:

@ -36,6 +36,7 @@ import com.arialyy.aria.core.download.M3U8Entity;
import com.arialyy.aria.core.download.m3u8.M3U8VodOption; import com.arialyy.aria.core.download.m3u8.M3U8VodOption;
import com.arialyy.aria.core.inf.IEntity; import com.arialyy.aria.core.inf.IEntity;
import com.arialyy.aria.core.processor.IBandWidthUrlConverter; import com.arialyy.aria.core.processor.IBandWidthUrlConverter;
import com.arialyy.aria.core.processor.IKeyUrlConverter;
import com.arialyy.aria.core.processor.ITsMergeHandler; import com.arialyy.aria.core.processor.ITsMergeHandler;
import com.arialyy.aria.core.processor.IVodTsUrlConverter; import com.arialyy.aria.core.processor.IVodTsUrlConverter;
import com.arialyy.aria.core.task.DownloadTask; import com.arialyy.aria.core.task.DownloadTask;
@ -308,6 +309,7 @@ public class M3U8VodDLoadActivity extends BaseActivity<ActivityM3u8VodBinding> {
//.merge(true) //.merge(true)
.setVodTsUrlConvert(new VodTsUrlConverter()); .setVodTsUrlConvert(new VodTsUrlConverter());
//.setMergeHandler(new TsMergeHandler()); //.setMergeHandler(new TsMergeHandler());
option.setKeyUrlConverter(new KeyUrlConverter());
option.setBandWidthUrlConverter(new BandWidthUrlConverter(mUrl)); option.setBandWidthUrlConverter(new BandWidthUrlConverter(mUrl));
return option; return option;
} }
@ -357,4 +359,12 @@ public class M3U8VodDLoadActivity extends BaseActivity<ActivityM3u8VodBinding> {
return url.substring(0, index + 1) + bandWidthUrl; return url.substring(0, index + 1) + bandWidthUrl;
} }
} }
static class KeyUrlConverter implements IKeyUrlConverter{
@Override public String convert(String keyUrl) {
ALog.d("TAG", "convertUrl....");
return null;
}
}
} }

@ -45,7 +45,7 @@ task clean(type: Delete) {
ext { ext {
versionCode = 378 versionCode = 378
versionName = '3.7.8-pre-3' versionName = '3.7.8'
userOrg = 'arialyy' userOrg = 'arialyy'
groupId = 'com.arialyy.aria' groupId = 'com.arialyy.aria'
publishVersion = versionName publishVersion = versionName

Loading…
Cancel
Save