fix: move checksum to HTTP opts, fix mismatch retry, scope get_download_speed to aggregate-only

This commit is contained in:
ashish6298 committed 2026-09-25 12:15:50 +05:30
1 parent 929e2d2d7c
commit b5e8d61f01
16 files changed
+501 -655

No files matched your search

+7 -5
View File
@@ -19,13 +19,13 @@ func main() {
var wg sync.WaitGroup
wg.Add(1)
var checksumOpt *base.ChecksumOption
var checksumOpt *http.ChecksumOption
if args.checksum != nil && *args.checksum != "" {
algo := "md5"
if args.checksumAlgo != nil && *args.checksumAlgo != "" {
algo = *args.checksumAlgo
}
checksumOpt = &base.ChecksumOption{
checksumOpt = &http.ChecksumOption{
Algorithm: algo,
Expected: *args.checksum,
}
@@ -55,9 +55,11 @@ func main() {
}
}).
Create(&base.Options{
Path: *args.dir,
Extra: http.OptsExtra{Connections: *args.connections},
Checksum: checksumOpt,
Path: *args.dir,
Extra: http.OptsExtra{
Connections: *args.connections,
Checksum: checksumOpt,
},
})
if err != nil {
panic(err)