fix: progress always at 0% and context cancelled before sendDocument
All checks were successful
CI / build (push) Successful in 50s
All checks were successful
CI / build (push) Successful in 50s
- Fix progress template: remove spurious stderr: prefix and switch to _percent_str/_speed_str/_eta_str keys (progress.percent outputs NA for HLS streams with unknown total size) - Update progress regex to match new template format: DLPROG| 45.2%| 1.05MiB/s|00:45 - Fix context cancellation bug: clearActiveJob was cancelling dlCtx before handleDownloadCompletion could send the document - Update progress test cases to match new template output format
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
var progressRE = regexp.MustCompile(`\[\w+\]\s+([\d.]+)%\s+of\s+~?([\d.]+)(\w+)`)
|
||||
var progressTemplateRE = regexp.MustCompile(`^DLPROG\|([\d.]+)\|(.*?)\|(.*)$`)
|
||||
var progressTemplateRE = regexp.MustCompile(`^DLPROG\|\s*([\d.]+)%\|\s*(.*?)\s*\|(.*)$`)
|
||||
|
||||
type progressUpdate struct {
|
||||
pct float64
|
||||
|
||||
Reference in New Issue
Block a user