feat: add custom yt-dlp arguments setting
Adds a 'Custom yt-dlp Arguments' field in Settings > Download that appends extra flags to every yt-dlp command. This enables users to pass flags like --no-check-certificates to bypass SSL verification issues.
Changes:
- Added customYtdlpArgs field to DownloadSettings, ItemDownloadSettings, ItemUniversalSettings
- Added UI input in Settings > Download section
- Pass custom args to all yt-dlp invocations: downloads, video info fetch, playlist expansion, transcript fetch
- Added shell_split_args helper for proper quoted token parsing
- i18n keys for en, vi, zh-CN
@miguelAngelo1999 CI fail please re-check and please create branch from master instead of develop. Thanks
@codex review
Thanks for adding this. Since Youwee is a local desktop app, this is not a direct remote-exploit issue by itself. However, unrestricted raw yt-dlp arguments are still risky because users may copy/paste unsafe flags, and options like --exec, custom downloaders, config files, cookies, paths, proxies, or headers can change filesystem, network, or command execution behavior outside what the app normally controls. I’d prefer we either add an allowlist for safe options or put this behind a clearly labeled advanced/danger mode with validation and warnings.
@vanloctech Thanks for the feedback! I've implemented the safety measures you suggested:
Backend blocklist (Rust-level enforcement):
- Added
validate_custom_ytdlp_args()that rejects dangerous flags before they reach yt-dlp - Blocked:
--exec,--exec-before-download,--config-location,--batch-file,--download-archive,--cookies,--cookies-from-browser,--load-info-json,--plugin-dirs - Returns clear error message to the user if a blocked flag is detected
Frontend warnings:
- Amber warning banner in settings: "Advanced feature — use with caution"
- Explains that dangerous flags are automatically blocked
- Shows the full list of blocked flags below the input
This way users can still use safe flags like --no-check-certificates, --ignore-errors, --geo-bypass, etc., while flags that could execute commands or access sensitive data are blocked at the backend level.
Let me know if you'd like any changes to the blocklist or UI!
Added some safe args in v0.18.0