Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

只有DownloadTask能获取到下载速度,其他方法都获取不到 #495

Open
xicong opened this issue Oct 31, 2019 · 14 comments

Comments

@xicong
Copy link

@xicong xicong commented Oct 31, 2019

Aria版本

3.7.2

什么问题

不知道为什么只能在注解的DownloadTask里面的getEntity()能拿到当前下载速度convertSpeed,其他的entity拿到的convertSpeed都是null
image
image

如何复现此问题

控制台日志

@AriaLyy

This comment has been minimized.

Copy link
Owner

@AriaLyy AriaLyy commented Oct 31, 2019

注解里面的速度是实时的,只有运行中的任务才有速度。
Aria.download(this).getTaskList()是从数据库中获取的,而数据库是不保存速度的,因为也没必要,毕竟速度是不断变化的。

@xicong

This comment has been minimized.

Copy link
Author

@xicong xicong commented Oct 31, 2019

那么获取实时速度到方法只能通过DownloadTask么,其他地方获取到话都是没保存,获取出来就是null吗

@AriaLyy

This comment has been minimized.

Copy link
Owner

@AriaLyy AriaLyy commented Oct 31, 2019

是的

@xicong

This comment has been minimized.

Copy link
Author

@xicong xicong commented Oct 31, 2019

好的,谢谢,大佬,还有个问题想问问你,就是我用的普通下载的多任务下载,但是在下载第一个之外其他任务的时候,要出现等待中状态好久好久才会下载

@AriaLyy

This comment has been minimized.

Copy link
Owner

@AriaLyy AriaLyy commented Oct 31, 2019

修改最大任务数配置就可:https://aria.laoyuyu.me/aria_doc/start/config.html

@xicong

This comment has been minimized.

Copy link
Author

@xicong xicong commented Oct 31, 2019

改了,但是下载第2,3个任务第时候先是等待中状态出现好久才会开始下载

@xicong

This comment has been minimized.

Copy link
Author

@xicong xicong commented Oct 31, 2019

image
就像这个,明明设置的是多任务下载,但是第一个都快下载完了,第二个和第三个还出现等待中

@AriaLyy

This comment has been minimized.

Copy link
Owner

@AriaLyy AriaLyy commented Oct 31, 2019

image
应该是这个东西导致的,后面改下数值就行了

@xicong

This comment has been minimized.

Copy link
Author

@xicong xicong commented Oct 31, 2019

好的,辛苦大佬了

@AriaLyy

This comment has been minimized.

Copy link
Owner

@AriaLyy AriaLyy commented Oct 31, 2019

使用3.7.3

@xicong

This comment has been minimized.

Copy link
Author

@xicong xicong commented Oct 31, 2019

image

image
大佬,感觉还是不对啊,下载第一个的时候其余的都在等待中,第一个下载完了之后,第二个和第六个才同时开始,

@xicong

This comment has been minimized.

Copy link
Author

@xicong xicong commented Oct 31, 2019

又测试了一次,刚开始的时候还是只有第一个在下载,第一个下载完后,执行了一下Aria.download(this).resumeAllTask();
剩下的其中四个开始同时下载

@AriaLyy

This comment has been minimized.

Copy link
Owner

@AriaLyy AriaLyy commented Oct 31, 2019

我这测试是正常的呢,😅
image

AriaLyy added a commit that referenced this issue Nov 1, 2019
fix bug #496
@xicong

This comment has been minimized.

Copy link
Author

@xicong xicong commented Nov 1, 2019

好,辛苦了,我跟你demo在测试对比一下,看看是不是我代码写的有问题之类的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.