Add live per-job progress bars with polling #4
Reference in New Issue
Block a user
Delete Branch "codex/add-integration-for-chatgpt.com-xrizez"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
Description
progressfield to theJobdataclass and initialize it insubmitand the worker, setting it to100.0on completion.run_ytdlpandrun_aria2to stream subprocess output, parse percentage values with regex, and report progress through aprogress_cbcallback./jobsJSON endpoint that returnsidandprogressfor each job and client-side JSrefreshProgressthat polls this endpoint every 2s to update.progress-barand.progress-text.static/style.css(.progress,.progress-bar,.progress-text).Testing
Codex Task
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
55dcd1f4faℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The progress regex is double‑escaped (
r"\\[download\\]\\s+([\\d.]+)%"), which makes it look for a literal backslash plus a single character from a character class rather than the actual"[download] 12.3%"lines yt‑dlp prints. In that casematchnever triggers, so progress stays at 0% and the new live progress bar never updates. Using the unescaped formr"\[download\]\s+([\d.]+)%"(single backslashes) is needed to match real output.Useful? React with 👍 / 👎.
The aria2 progress regex is also double‑escaped (
r"\\((\\d+)%\\)"), which makes it look for a literal backslash before/after the parentheses instead of matching the normal"(10%)"progress snippet. That meansmatchnever fires and progress never advances from 0% for aria2 downloads. The pattern should ber"\((\d+)%\)"to match aria2’s output.Useful? React with 👍 / 👎.