diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/SFtpOption.java b/Aria/src/main/java/com/arialyy/aria/core/common/SFtpOption.java index 9841d58e..701d4a56 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/SFtpOption.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/SFtpOption.java @@ -35,7 +35,7 @@ public class SFtpOption extends BaseOption { public SFtpOption() { super(); - ComponentUtil.getInstance().checkComponentExist(ComponentUtil.COMPONENT_TYPE_M3U8); + ComponentUtil.getInstance().checkComponentExist(ComponentUtil.COMPONENT_TYPE_SFTP); } public SFtpOption charSet(String charSet) { diff --git a/FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpSubDLoaderUtil.java b/FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpSubDLoaderUtil.java index 6a5eaa06..b8470408 100644 --- a/FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpSubDLoaderUtil.java +++ b/FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpSubDLoaderUtil.java @@ -19,6 +19,7 @@ import android.os.Handler; import com.arialyy.aria.core.download.DTaskWrapper; import com.arialyy.aria.core.group.AbsSubDLoadUtil; 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.NormalTTBuilder; import com.arialyy.aria.core.loader.SubLoader; @@ -48,6 +49,7 @@ final class FtpSubDLoaderUtil extends AbsSubDLoadUtil { @Override protected LoaderStructure buildLoaderStructure() { LoaderStructure structure = new LoaderStructure(); structure.addComponent(new SubRecordHandler(getWrapper())) + .addComponent(new GroupSubThreadStateManager(getSchedulers(),getKey())) .addComponent(new NormalTTBuilder(getWrapper(), new FtpDTTBuilderAdapter())) .addComponent(new FtpDFileInfoTask(getWrapper())); structure.accept(getLoader()); diff --git a/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java b/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java index 88f80f19..97862a8b 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java +++ b/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java @@ -33,7 +33,7 @@ public class FtpDownloadModule extends BaseViewModule { private final String FTP_URL_KEY = "FTP_URL_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 = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath(); @@ -46,12 +46,12 @@ public class FtpDownloadModule extends BaseViewModule { LiveData getFtpDownloadInfo(Context context) { //String url = AppUtil.getConfigValue(context, FTP_URL_KEY, ftpDefUrl); //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) { singDownloadInfo = new DownloadEntity(); - singDownloadInfo.setUrl(url); + singDownloadInfo.setUrl(ftpDefUrl); String name = getFileName(ftpDefUrl); singDownloadInfo.setFileName(name); singDownloadInfo.setFilePath(ftpDefPath + name); diff --git a/app/src/main/java/com/arialyy/simple/core/download/group/FTPDirDownloadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/group/FTPDirDownloadActivity.java index cb8fb31b..e6721987 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/group/FTPDirDownloadActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/group/FTPDirDownloadActivity.java @@ -36,7 +36,7 @@ import com.arialyy.simple.widget.SubStateLinearLayout; * Created by lyy on 2017/7/6. */ public class FTPDirDownloadActivity extends BaseActivity { - 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 long mTaskId = -1; @@ -51,8 +51,10 @@ public class FTPDirDownloadActivity extends BaseActivity