m3u8点播文件下载实现

v3.6.6
laoyuyu 6 years ago
commit 1469ca1cea
  1. 2
      Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8Delegate.java
  2. 1
      Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8FileInfoThread.java
  3. 2
      app/src/main/java/com/arialyy/simple/core/download/SingleTaskActivity.java

@ -41,7 +41,7 @@ public class M3U8Delegate<TARGET extends AbsTarget> extends BaseDelegate<TARGET>
}
/**
* 设置文件长度由于m3u8协议的特殊性你需要设置文件长度才能获取到正确的下载进度百分比
* 设置文件长度由于m3u8协议的特殊性你需要设置文件长度才能获取到正确的下载进度百分比
*
* @param fileSize 文件长度
*/

@ -70,6 +70,7 @@ public class M3U8FileInfoThread implements Runnable {
ConnectionHelp.setConnectParam(mTaskDelegate, conn);
conn.setConnectTimeout(mConnectTimeOut);
conn.connect();
Map<String, List<String>> head = conn.getHeaderFields();
handleConnect(conn);
} catch (IOException e) {
e.printStackTrace();

@ -256,7 +256,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
Toast.LENGTH_SHORT).show();
getBinding().setStateStr(getString(R.string.re_start));
getBinding().setSpeed("");
ALog.d(TAG, "md5: " + CommonUtil.getFileMD5(new File(task.getDownloadPath())));
ALog.d(TAG, "md5: " + CommonUtil.getFileMD5(new File(task.getFilePath())));
}
}

Loading…
Cancel
Save