Expand description
URL import: download media from a link with yt-dlp.exe, the same child-process pattern
ffpipe.rs uses for ffmpeg. Entirely optional — exe() returns None when yt-dlp is not installed
and the Library then hides its “Import URL…” button.
yt-dlp is driven with --print after_move:filepath (prints the final file, and because a later
stage is named it does not imply --simulate) plus --progress --newline --progress-template so
progress and the resulting path both arrive as lines on stdout.
Structs§
- Download
- A running download.
progressdrives the UI (andprogress.cancelkills yt-dlp);path()is the downloaded file onceprogress.is_done()with no error. - Download
Options
Statics§
Functions§
- annotate_
if_ 🔒outdated - yt-dlp’s own stderr, tacking on an update hint when the message is one it (or YouTube’s bot-check) prints for a stale extractor — these are real yt-dlp errors, not ours, but “install a newer yt-dlp” is the actual fix often enough that it is worth saying plainly instead of leaving the user to guess.
- default_
dir - Where downloads go by default: the user’s Videos folder, else the temp dir.
- exe
- The best working
yt-dlp.exe, or None when none is installed (the URL import is hidden then). - parse_
percent 🔒 - Percent from a
dl:progress line (“dl: 45.2%” → 0.452). None for any other line. - run 🔒
- set_dir
- Set the user-configured yt-dlp directory (“” = app dir, then PATH).
- start_
download - version 🔒
- This exe’s version string (“2026.08.19”), or None if it does not actually run (a broken shim exits non-zero and prints nothing).