Commit Graph
7 Commits
Author SHA1 Message Date
anthonyandClaude Sonnet 5 837dc954c2 fix: replace ts-node with tsx for worker scripts
TypeScript 7's CommonJS export no longer populates ts.sys, which
ts-node's config loader depends on, breaking `npm run worker` with
a TypeError. tsx (esbuild-based) doesn't rely on that API and
natively resolves tsconfig.json path aliases, so tsconfig-paths is
also no longer needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 14:22:46 +02:00
anthonyandClaude Sonnet 5 27ba48d181 feat: gate download options on real-time yt-dlp video analysis
Options (quality, subtitles) are now derived from a yt-dlp -J probe of
the submitted URL instead of a static list, so users can't pick
combinations the source video doesn't actually support. Submission is
blocked until the probe succeeds.

- New /api/probe endpoint + src/lib/ytdlp-probe.ts, with its own rate
  limiter (rate-limit.ts refactored into a createRateLimiter factory).
- New options: subtitle language selection, clip start/end trim, MP3
  audio quality.
- Fixed buildYtdlpArgs: format=mp3 never triggered audio extraction
  (-x/--audio-format), and quality=best never applied --merge-output-format,
  so the chosen container had no real effect.
- Cross-platform yt-dlp invocation: the bundled bin/yt-dlp is a Python
  zipapp relying on a shebang, which Windows' spawn() can't run
  directly. buildYtdlpCommand() runs it through `python` on Windows and
  execs it directly on Linux/o2switch, where the shebang works natively.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 14:13:38 +02:00
anthony 95d25a6d8a fix: add missing existsSync to fs mock in processor tests 2026-08-11 09:04:16 +02:00
anthonyandClaude Sonnet 4.6 01b67bb81c feat: bundle yt-dlp and ffmpeg Linux binaries in bin/
Adds precompiled Linux x86_64 binaries for yt-dlp and ffmpeg under bin/.
The processor resolves yt-dlp from bin/ when present, falling back to PATH.
ffmpeg is passed via --ffmpeg-location so yt-dlp uses the bundled binary on o2switch.
BIN_DIR is configurable via env var.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-10 15:13:23 +02:00
anthony 479ce1b921 feat: add cron cleanup and worker-check scripts 2026-08-10 14:49:28 +02:00
anthony e6d937fd9b feat: add worker main poll loop 2026-08-10 14:46:30 +02:00
anthony 443657ceef feat: add yt-dlp download processor 2026-08-10 14:42:29 +02:00