laoyuyu 4 years ago
parent 0152187aa8
commit f67f829dfc
  1. 2
      Aria/src/main/java/com/arialyy/aria/core/common/SFtpOption.java
  2. 2
      FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpSubDLoaderUtil.java
  3. 8
      app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java
  4. 6
      app/src/main/java/com/arialyy/simple/core/download/group/FTPDirDownloadActivity.java
  5. 3
      app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodModule.java
  6. 2
      build.gradle

@ -35,7 +35,7 @@ public class SFtpOption extends BaseOption {
public SFtpOption() { public SFtpOption() {
super(); super();
ComponentUtil.getInstance().checkComponentExist(ComponentUtil.COMPONENT_TYPE_M3U8); ComponentUtil.getInstance().checkComponentExist(ComponentUtil.COMPONENT_TYPE_SFTP);
} }
public SFtpOption charSet(String charSet) { public SFtpOption charSet(String charSet) {

@ -19,6 +19,7 @@ import android.os.Handler;
import com.arialyy.aria.core.download.DTaskWrapper; import com.arialyy.aria.core.download.DTaskWrapper;
import com.arialyy.aria.core.group.AbsSubDLoadUtil; import com.arialyy.aria.core.group.AbsSubDLoadUtil;
import com.arialyy.aria.core.group.SubRecordHandler; import com.arialyy.aria.core.group.SubRecordHandler;
import com.arialyy.aria.core.loader.GroupSubThreadStateManager;
import com.arialyy.aria.core.loader.LoaderStructure; import com.arialyy.aria.core.loader.LoaderStructure;
import com.arialyy.aria.core.loader.NormalTTBuilder; import com.arialyy.aria.core.loader.NormalTTBuilder;
import com.arialyy.aria.core.loader.SubLoader; import com.arialyy.aria.core.loader.SubLoader;
@ -48,6 +49,7 @@ final class FtpSubDLoaderUtil extends AbsSubDLoadUtil {
@Override protected LoaderStructure buildLoaderStructure() { @Override protected LoaderStructure buildLoaderStructure() {
LoaderStructure structure = new LoaderStructure(); LoaderStructure structure = new LoaderStructure();
structure.addComponent(new SubRecordHandler(getWrapper())) structure.addComponent(new SubRecordHandler(getWrapper()))
.addComponent(new GroupSubThreadStateManager(getSchedulers(),getKey()))
.addComponent(new NormalTTBuilder(getWrapper(), new FtpDTTBuilderAdapter())) .addComponent(new NormalTTBuilder(getWrapper(), new FtpDTTBuilderAdapter()))
.addComponent(new FtpDFileInfoTask(getWrapper())); .addComponent(new FtpDFileInfoTask(getWrapper()));
structure.accept(getLoader()); structure.accept(getLoader());

@ -33,7 +33,7 @@ public class FtpDownloadModule extends BaseViewModule {
private final String FTP_URL_KEY = "FTP_URL_KEY"; private final String FTP_URL_KEY = "FTP_URL_KEY";
private final String FTP_PATH_KEY = "FTP_PATH_KEY"; private final String FTP_PATH_KEY = "FTP_PATH_KEY";
private final String ftpDefUrl = "ftp://9.9.9.50:2121/Cyberduck-6.9.4.30164.zip"; private final String ftpDefUrl = "ftp://192.168.0.104:2121/qqqq.exe";
private final String ftpDefPath = private final String ftpDefPath =
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath(); Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath();
@ -46,12 +46,12 @@ public class FtpDownloadModule extends BaseViewModule {
LiveData<DownloadEntity> getFtpDownloadInfo(Context context) { LiveData<DownloadEntity> getFtpDownloadInfo(Context context) {
//String url = AppUtil.getConfigValue(context, FTP_URL_KEY, ftpDefUrl); //String url = AppUtil.getConfigValue(context, FTP_URL_KEY, ftpDefUrl);
//String filePath = AppUtil.getConfigValue(context, FTP_PATH_KEY, ftpDefPath); //String filePath = AppUtil.getConfigValue(context, FTP_PATH_KEY, ftpDefPath);
String url = "ftp://9.9.9.72:2121/Cyberduck-6.9.4.30164.zip"; //String url = "ftp://9.9.9.72:2121/Cyberduck-6.9.4.30164.zip";
singDownloadInfo = Aria.download(context).getFirstDownloadEntity(url); singDownloadInfo = Aria.download(context).getFirstDownloadEntity(ftpDefUrl);
if (singDownloadInfo == null) { if (singDownloadInfo == null) {
singDownloadInfo = new DownloadEntity(); singDownloadInfo = new DownloadEntity();
singDownloadInfo.setUrl(url); singDownloadInfo.setUrl(ftpDefUrl);
String name = getFileName(ftpDefUrl); String name = getFileName(ftpDefUrl);
singDownloadInfo.setFileName(name); singDownloadInfo.setFileName(name);
singDownloadInfo.setFilePath(ftpDefPath + name); singDownloadInfo.setFilePath(ftpDefPath + name);

@ -36,7 +36,7 @@ import com.arialyy.simple.widget.SubStateLinearLayout;
* Created by lyy on 2017/7/6. * Created by lyy on 2017/7/6.
*/ */
public class FTPDirDownloadActivity extends BaseActivity<ActivityDownloadGroupBinding> { public class FTPDirDownloadActivity extends BaseActivity<ActivityDownloadGroupBinding> {
private static final String dir = "ftp://9.9.9.72:2121/upload/测试"; private static final String dir = "ftp://192.168.0.104:2121/aab/你好";
private SubStateLinearLayout mChildList; private SubStateLinearLayout mChildList;
private long mTaskId = -1; private long mTaskId = -1;
@ -51,8 +51,10 @@ public class FTPDirDownloadActivity extends BaseActivity<ActivityDownloadGroupBi
if (entity != null) { if (entity != null) {
mTaskId = entity.getId(); mTaskId = entity.getId();
mChildList.addData(entity.getSubEntities()); mChildList.addData(entity.getSubEntities());
getBinding().pl.setInfo(entity); }else {
entity = new DownloadGroupEntity();
} }
getBinding().pl.setInfo(entity);
getBinding().pl.setBtListener(new ProgressLayout.OnProgressLayoutBtListener() { getBinding().pl.setBtListener(new ProgressLayout.OnProgressLayoutBtListener() {
@Override public void create(View v, AbsEntity entity) { @Override public void create(View v, AbsEntity entity) {
mTaskId = Aria.download(this) mTaskId = Aria.download(this)

@ -34,7 +34,8 @@ public class M3U8VodModule extends BaseViewModule {
// m3u8测试集合:http://www.voidcn.com/article/p-snaliarm-ct.html // m3u8测试集合:http://www.voidcn.com/article/p-snaliarm-ct.html
//private final String defUrl = "https://www.gaoya123.cn/2019/1557993797897.m3u8"; //private final String defUrl = "https://www.gaoya123.cn/2019/1557993797897.m3u8";
// 多码率地址: // 多码率地址:
private final String defUrl = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"; //private final String defUrl = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8";
private final String defUrl = "https://5.voooe.cn/cache/youku/4e00b49a6e4f11155967c2cb3385a2ab.m3u8";
//private final String defUrl = "http://pp3zvsk2n.bkt.clouddn.com/20200806/sd/15967206011811803/38475fadd55e4ecea3.m3u8"; //private final String defUrl = "http://pp3zvsk2n.bkt.clouddn.com/20200806/sd/15967206011811803/38475fadd55e4ecea3.m3u8";
//private final String defUrl = "http://youku.cdn7-okzy.com/20200123/16815_fbe419ed/index.m3u8"; //private final String defUrl = "http://youku.cdn7-okzy.com/20200123/16815_fbe419ed/index.m3u8";

@ -45,7 +45,7 @@ task clean(type: Delete) {
ext { ext {
versionCode = 390 versionCode = 390
versionName = '3.8.14' versionName = '3.8.15-bate-1'
userOrg = 'arialyy' userOrg = 'arialyy'
groupId = 'com.arialyy.aria' groupId = 'com.arialyy.aria'
publishVersion = versionName publishVersion = versionName

Loading…
Cancel
Save