feat(task): add speed monitor (#7655)

This commit is contained in:
KirCute_ECT
2024-12-25 21:09:54 +08:00
committed by GitHub
parent db99224126
commit d7aa1608ac
18 changed files with 116 additions and 44 deletions

View File

@ -107,6 +107,7 @@ func (p *Cloud115) Status(task *tool.DownloadTask) (*tool.Status, error) {
s.Progress = t.Percent
s.Status = t.GetStatus()
s.Completed = t.IsDone()
s.TotalBytes = t.Size
if t.IsFailed() {
s.Err = fmt.Errorf(t.GetStatus())
}