fix: remove --progress-template, parse default [download] output instead
All checks were successful
CI / build (push) Successful in 40s
All checks were successful
CI / build (push) Successful in 40s
--progress-template output is suppressed in non-TTY subprocesses (yt-dlp issue #13649). The default [download] progress format works reliably in pipes. Changes: - Remove --progress-template from yt-dlp args entirely - Keep --newline for newline-delimited output in pipe - Fix progressRE regex to handle HLS format: ~ with leading spaces before size (e.g. '~ 1.00KiB') - Fix speed parsing in [download] fallback to handle multiple leading spaces (e.g. 'at 976.20B/s') - Fix ETA parsing to strip (frag n/m) suffix - Filter Unknown/N/A speed/eta in [download] fallback - Add test cases for real HLS fragment output format
This commit is contained in:
@@ -283,9 +283,8 @@ func (c *Client) StartDownload(job *domain.DownloadJob, downloadDir string) (<-c
|
||||
outputPath := filepath.Join(downloadDir, job.ID+"_%(id)s.%(ext)s")
|
||||
args = append(args, "--output", outputPath)
|
||||
|
||||
// Progress reporting using progress-template for machine-readable output
|
||||
// Use --newline so each progress line is newline-delimited in pipe
|
||||
args = append(args, "--newline")
|
||||
args = append(args, "--progress-template", "DLPROG|%(progress._percent_str)s|%(progress._speed_str)s|%(progress._eta_str)s")
|
||||
|
||||
// Language selection if specified
|
||||
if job.Language != "" {
|
||||
|
||||
Reference in New Issue
Block a user