Commit Graph
8 Commits
Author SHA1 Message Date
anthonyandClaude Sonnet 5 fd0bc092bd fix: fix o2switch deployment build and yt-dlp Python compatibility
Turbopack requires native SWC bindings unavailable on o2switch's old
glibc, so force webpack for production builds. NODE_ENV=production on
o2switch's shell also caused npm to skip devDependencies needed at
build time (Tailwind, PostCSS), so deploy now installs with
--include=dev.

yt-dlp's standalone PyInstaller binary self-extracts to noexec /tmp
and fails to mmap its bundled shared libs there, and o2switch's system
python3 (3.6) is too old for the plain zipapp. Revert to the zipapp
and invoke it explicitly through a configurable PYTHON_BIN, set to
o2switch's newer Python 3.11 in .env.prod.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 16:13:12 +02:00
anthonyandClaude Sonnet 5 38e52374c9 feat: name downloaded file after the video title and add a back-to-home link
The download endpoint served files under their internal uuid-based
storage name; it now builds the Content-Disposition filename from the
probed video title (persisted on submit) with the original extension,
falling back to the old behavior when no title is available. The
status page also gets an always-visible link back to the homepage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 15:53:14 +02:00
anthony e23bd6b235 test: cover 4K format selector in buildYtdlpArgs 2026-08-11 15:19:02 +02:00
anthony 0d46a9a099 feat: add 4K and 2K quality tiers 2026-08-11 15:18:35 +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 ab9235fe57 feat: add yt-dlp argument builder 2026-08-10 14:31:43 +02:00
anthony 4766bb3a18 feat: add token create/validate utilities 2026-08-10 14:29:43 +02:00
anthony 3feb336bb0 feat: add IP-based rate limiter (swc/jest replaces ts-jest for TS7 compat) 2026-08-10 14:28:13 +02:00