feat: support create task directly (#262)

This commit is contained in:
Levi authored and GitHub committed 2023-11-09 16:52:02 +08:00
1 parent aae79c2449
commit af52c4ce7e
12 files changed
+343 -297

No files matched your search

+2 -2
View File
@@ -161,7 +161,7 @@ func (f *Fetcher) Wait() (err error) {
}
}
if !selected {
util.SafeRemove(filepath.Join(f.meta.Opts.Path, file.Path()))
util.SafeRemove(filepath.Join(f.meta.Opts.Path, f.meta.Res.Name, file.Path()))
}
}
break
@@ -202,7 +202,7 @@ func (f *Fetcher) updateRes() {
Size: file.Length(),
}
}
res.CalcSize()
res.CalcSize(nil)
f.meta.Res = res
if f.meta.Opts != nil {
f.meta.Opts.InitSelectFiles(len(res.Files))