sftp上传实现
This commit is contained in:
@@ -32,7 +32,7 @@ import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
public abstract class BaseM3U8Loader extends AbsNormalLoader {
|
||||
public abstract class BaseM3U8Loader extends AbsNormalLoader<DTaskWrapper> {
|
||||
protected M3U8TaskOption mM3U8Option;
|
||||
|
||||
public BaseM3U8Loader(DTaskWrapper wrapper, IEventListener listener) {
|
||||
@@ -138,6 +138,6 @@ public abstract class BaseM3U8Loader extends AbsNormalLoader {
|
||||
}
|
||||
|
||||
protected DownloadEntity getEntity() {
|
||||
return (DownloadEntity) mTaskWrapper.getEntity();
|
||||
return mTaskWrapper.getEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ final public class M3U8InfoTask implements IInfoTask {
|
||||
IKeyUrlConverter keyUrlConverter = mM3U8Option.getKeyUrlConverter();
|
||||
String keyUrl = info.keyUrl;
|
||||
if (keyUrlConverter != null) {
|
||||
keyUrl = keyUrlConverter.convert(keyUrl);
|
||||
keyUrl = keyUrlConverter.convert(mEntity.getUrl(), keyUrl);
|
||||
}
|
||||
if (TextUtils.isEmpty(keyUrl)) {
|
||||
ALog.e(TAG, "m3u8密钥key url 为空");
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.arialyy.aria.http.ConnectionHelp;
|
||||
import com.arialyy.aria.http.HttpTaskOption;
|
||||
import com.arialyy.aria.util.ALog;
|
||||
import com.arialyy.aria.util.CheckUtil;
|
||||
import com.arialyy.aria.util.CommonUtil;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -47,7 +48,7 @@ import java.util.Set;
|
||||
* Created by lyy on 2017/1/18. 下载线程
|
||||
*/
|
||||
public final class M3U8ThreadTaskAdapter extends AbsThreadTaskAdapter {
|
||||
private final String TAG = "M3U8ThreadTask";
|
||||
private final String TAG = CommonUtil.getClassName(this);
|
||||
private HttpTaskOption mHttpTaskOption;
|
||||
private BufferedInputStream is = null;
|
||||
|
||||
@@ -167,7 +168,9 @@ public final class M3U8ThreadTaskAdapter extends AbsThreadTaskAdapter {
|
||||
conn.disconnect(); // 关闭上一个连接
|
||||
URL url = ConnectionHelp.handleUrl(newUrl, mHttpTaskOption);
|
||||
conn = ConnectionHelp.handleConnection(url, mHttpTaskOption);
|
||||
conn.setRequestProperty("Cookie", cookies);
|
||||
if (!TextUtils.isEmpty(cookies)){
|
||||
conn.setRequestProperty("Cookie", cookies);
|
||||
}
|
||||
if (mHttpTaskOption.isChunked()) {
|
||||
conn.setDoInput(true);
|
||||
conn.setChunkedStreamingMode(0);
|
||||
|
||||
Reference in New Issue
Block a user