This commit is contained in:
@@ -128,7 +128,9 @@ class BaseDListener<ENTITY extends AbsEntity, TASK_ENTITY extends AbsTaskEntity<
|
||||
} else {
|
||||
mEntity.setSpeed(speed < 0 ? 0 : speed);
|
||||
}
|
||||
mEntity.setPercent((int) (mEntity.getCurrentProgress() * 100 / mEntity.getFileSize()));
|
||||
|
||||
mEntity.setPercent((int) (mEntity.getFileSize() <= 0 ? 0
|
||||
: mEntity.getCurrentProgress() * 100 / mEntity.getFileSize()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -566,7 +566,8 @@ public abstract class AbsGroupUtil implements IUtil {
|
||||
private void handleSpeed(long speed) {
|
||||
subEntity.setSpeed(speed);
|
||||
subEntity.setConvertSpeed(speed <= 0 ? "" : CommonUtil.formatFileSize(speed) + "/s");
|
||||
subEntity.setPercent((int) (subEntity.getCurrentProgress() * 100 / subEntity.getFileSize()));
|
||||
subEntity.setPercent((int) (subEntity.getFileSize() <= 0 ? 0
|
||||
: subEntity.getCurrentProgress() * 100 / subEntity.getFileSize()));
|
||||
}
|
||||
|
||||
private void saveData(int state, long location) {
|
||||
|
@@ -116,7 +116,8 @@ class BaseUListener<ENTITY extends AbsEntity, TASK_ENTITY extends AbsTaskEntity<
|
||||
} else {
|
||||
mEntity.setSpeed(speed < 0 ? 0 : speed);
|
||||
}
|
||||
mEntity.setPercent((int) (mEntity.getCurrentProgress() * 100 / mEntity.getFileSize()));
|
||||
mEntity.setPercent((int) (mEntity.getFileSize() <= 0 ? 0
|
||||
: mEntity.getCurrentProgress() * 100 / mEntity.getFileSize()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,4 +1,7 @@
|
||||
## 开发日志
|
||||
+ v_3.3.7
|
||||
- 修复一个线程重启的问题 https://github.com/AriaLyy/Aria/issues/160
|
||||
- 修复配置文件异常问题、格式化速度为0问题 https://github.com/AriaLyy/Aria/issues/161
|
||||
+ v_3.3.6
|
||||
- 增加日志输出级别控制
|
||||
- 修复公网FTP地址不能下载的问题 https://github.com/AriaLyy/Aria/issues/146
|
||||
|
@@ -152,7 +152,8 @@ class Configuration {
|
||||
: UPLOAD_CONFIG_FILE));
|
||||
if (file.exists()) {
|
||||
Properties properties = CommonUtil.loadConfig(file);
|
||||
List<Field> fields = CommonUtil.getAllFields(getClass());
|
||||
List<Field> fields =
|
||||
CommonUtil.getAllFields(isDownload ? DownloadConfig.class : UploadConfig.class);
|
||||
try {
|
||||
for (Field field : fields) {
|
||||
int m = field.getModifiers();
|
||||
|
Reference in New Issue
Block a user