Skip to content

feat(backend): support selectable Apify YouTube downloader actors#71

Merged
FujiwaraChoki merged 2 commits into
mainfrom
feat/apify-multi-actor-downloader
Jun 30, 2026
Merged

feat(backend): support selectable Apify YouTube downloader actors#71
FujiwaraChoki merged 2 commits into
mainfrom
feat/apify-multi-actor-downloader

Conversation

@FujiwaraChoki

Copy link
Copy Markdown
Owner

Captures a feature that had been running directly on the production server (uncommitted) and lands it cleanly on main.

What

  • Add APIFY_YOUTUBE_DOWNLOADER_ACTOR config to choose which Apify actor performs YouTube downloads (default epctex/youtube-video-downloader).
  • _build_run_input() shapes the actor run-input per actor — supports epctex, eunit/youtube-video-downloader, and streamers/youtube-video-downloader (different input schemas).
  • Log the active actor when starting a download.
  • Expose APIFY_YOUTUBE_DOWNLOADER_ACTOR and the existing YOUTUBE_DOWNLOAD_PROVIDER through docker-compose.yml for the backend and worker services.
  • Set progress=0 on task error status updates (small fix bundled from the same prod snapshot).

Tests

  • New tests/unit/test_apify_youtube_downloader.py (actor run-input builder). Full affected suite: test_apify_youtube_downloader.py + test_task_service.py17 passed.

Notes

  • This is only the feature. The prod server also carries prod-specific docker-compose.yml edits (localhost port binding, removed dev-secret fallbacks, mcp.supoclip.com URL) that are intentionally excluded here — they don't belong in shared main. Full prod snapshot is preserved on branch prod-backup-20260630.
  • No dependency changes (uses the existing apify-client).

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.
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
supoclip Ready Ready Preview, Comment Jun 30, 2026 9:41pm

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread backend/src/apify_youtube_downloader.py Outdated
normalized_actor_id = actor_id.strip().lower()
if normalized_actor_id == EUNIT_YOUTUBE_DOWNLOADER_ACTOR:
return {
"url": url,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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.
@FujiwaraChoki

Copy link
Copy Markdown
Owner Author

Fixed in 62c1d6f. Verified both non-default actors against their Apify input schemas:

  • eunit/youtube-video-downloader — the bot is right; it requires startUrls as an array of {url} objects, not a top-level url. Changed the run-input to {"startUrls": [{"url": url}], ...} and updated the test.
  • streamers/youtube-video-downloader — its schema requires a videos array of {url} objects, which the code already produces, so no change there.

test_apify_youtube_downloader.py → 8 passed.

@FujiwaraChoki
FujiwaraChoki merged commit 2aa3ccb into main Jun 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant