feat: self-managing yt-dlp + ffmpeg version display
yt-dlp is now a managed, auto-updating binary rather than a static bundled one. On launch AeroFetch seeds a writable copy under userData from the bundled seed, self-heals it if it goes missing, and — throttled to once a day — self-updates it to the configured channel (default: nightly). This keeps the binary current so YouTube changes don't silently cause 403s, and an app reinstall (or portable re-extraction) can no longer roll it back. Settings shows an auto-update toggle, the live version, last-checked time, and the channel selector. Also surface the bundled ffmpeg/ffprobe versions in Settings (display only: they have no self-update path and, unlike yt-dlp, don't break as sites change, so there is no auto-update for them). - binaries: split the read-only bundled seed from the managed userData copy - ytdlp: ensureManagedYtdlp (seed + self-heal), startup auto-update runner - ytdlpPolicy: pure once-a-day throttle decision (unit-tested) - ffmpeg: parse ffmpeg/ffprobe -version for the Settings panel - settings/ipc/preload/renderer: new settings, IPC channels, types, and UI Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
getSystem32Path
|
||||
} from './binaries'
|
||||
import { getSettings, getDownloadArchivePath, getDefaultMediaDir } from './settings'
|
||||
import { ensureManagedYtdlp } from './ytdlp'
|
||||
import { getCookiesFilePath } from './cookies'
|
||||
import { listTemplates } from './templates'
|
||||
import { assertHttpUrl } from './url'
|
||||
@@ -240,11 +241,14 @@ export function startDownload(
|
||||
wc: WebContents,
|
||||
opts: StartDownloadOptions
|
||||
): StartDownloadResult {
|
||||
// Self-heal the managed copy from the bundled seed before spawning, so a
|
||||
// never-seeded or deleted yt-dlp.exe doesn't fail an otherwise-fine download.
|
||||
ensureManagedYtdlp()
|
||||
const ytdlp = getYtdlpPath()
|
||||
if (!existsSync(ytdlp)) {
|
||||
return {
|
||||
ok: false,
|
||||
error: `yt-dlp.exe not found at ${ytdlp}\nDrop it into resources/bin/ (see the README there).`
|
||||
error: `yt-dlp.exe is missing and couldn't be restored from the bundle.\nReinstall AeroFetch, or drop yt-dlp.exe into resources/bin/ (see the README there).`
|
||||
}
|
||||
}
|
||||
// ffmpeg is used by nearly every download (merge, audio extract, thumbnail/
|
||||
|
||||
Reference in New Issue
Block a user