修复wait 模式的bug

pull/330/head
AriaLyy 7 years ago
parent e8a9754567
commit 71a0ae4492
  1. 5
      Aria/src/main/java/com/arialyy/aria/core/command/normal/StartCmd.java
  2. 6
      Aria/src/main/java/com/arialyy/aria/core/download/downloader/FileInfoThread.java
  3. 4
      app/src/main/java/com/arialyy/simple/download/group/GroupModule.java

@ -63,9 +63,8 @@ class StartCmd<T extends AbsTaskEntity> extends AbsNormalCmd<T> {
}
} else {
// 任务不存在时,根据配置不同,对任务执行操作
if (!task.isRunning()
&& mod.equals(QueueMod.WAIT.getTag())
&& task.getState() == IEntity.STATE_WAIT) {
if (!task.isRunning() && mod.equals(QueueMod.WAIT.getTag()) && (task.getState()
== IEntity.STATE_WAIT || task.getState() == IEntity.STATE_STOP)) {
mQueue.startTask(task);
}
}

@ -25,8 +25,6 @@ import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLDecoder;
import java.util.List;
import java.util.Map;
/**
* 下载文件信息获取
@ -54,10 +52,6 @@ class FileInfoThread implements Runnable {
void onFail(String url, String errorMsg);
}
FileInfoThread(DownloadTaskEntity taskEntity) {
this(taskEntity, null);
}
FileInfoThread(DownloadTaskEntity taskEntity, OnFileInfoCallback callback) {
this.mTaskEntity = taskEntity;
mEntity = taskEntity.getEntity();

@ -32,8 +32,8 @@ public class GroupModule extends BaseModule {
List<String> getUrls() {
List<String> urls = new ArrayList<>();
//String[] str = getContext().getResources().getStringArray(R.array.download_url);
String[] str = getContext().getResources().getStringArray(R.array.group_urls);
String[] str = getContext().getResources().getStringArray(R.array.download_url);
//String[] str = getContext().getResources().getStringArray(R.array.group_urls);
Collections.addAll(urls, str);
return urls;
}

Loading…
Cancel
Save