feat(backend): support selectable Apify YouTube downloader actors#71
Conversation
Allow choosing the Apify actor used for YouTube downloads via APIFY_YOUTUBE_DOWNLOADER_ACTOR, with per-actor run-input shaping for epctex, eunit, and streamers actors (_build_run_input). Expose APIFY_YOUTUBE_DOWNLOADER_ACTOR and the existing YOUTUBE_DOWNLOAD_PROVIDER through docker-compose for backend and worker. Also set progress=0 on task error status updates. Includes unit tests for the actor run-input builder.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73d9d0a882
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| normalized_actor_id = actor_id.strip().lower() | ||
| if normalized_actor_id == EUNIT_YOUTUBE_DOWNLOADER_ACTOR: | ||
| return { | ||
| "url": url, |
There was a problem hiding this comment.
Send eunit inputs under startUrls
When APIFY_YOUTUBE_DOWNLOADER_ACTOR=eunit/youtube-video-downloader, this sends a top-level url, but the eunit actor's input schema requires startUrls as an array of {url} objects. In that configuration every Apify download will fail schema validation or process no input before falling back, so the newly advertised eunit actor path is not actually usable.
Useful? React with 👍 / 👎.
The eunit/youtube-video-downloader actor's input schema requires
startUrls as an array of {url} objects, not a top-level url string.
Previously every eunit download would fail schema validation. Update
the run-input builder and its test accordingly.
Addresses Codex review on #71.
|
Fixed in 62c1d6f. Verified both non-default actors against their Apify input schemas:
|
Captures a feature that had been running directly on the production server (uncommitted) and lands it cleanly on
main.What
APIFY_YOUTUBE_DOWNLOADER_ACTORconfig to choose which Apify actor performs YouTube downloads (defaultepctex/youtube-video-downloader)._build_run_input()shapes the actor run-input per actor — supportsepctex,eunit/youtube-video-downloader, andstreamers/youtube-video-downloader(different input schemas).APIFY_YOUTUBE_DOWNLOADER_ACTORand the existingYOUTUBE_DOWNLOAD_PROVIDERthroughdocker-compose.ymlfor the backend and worker services.progress=0on task error status updates (small fix bundled from the same prod snapshot).Tests
tests/unit/test_apify_youtube_downloader.py(actor run-input builder). Full affected suite:test_apify_youtube_downloader.py+test_task_service.py→ 17 passed.Notes
docker-compose.ymledits (localhost port binding, removed dev-secret fallbacks,mcp.supoclip.comURL) that are intentionally excluded here — they don't belong in sharedmain. Full prod snapshot is preserved on branchprod-backup-20260630.apify-client).