$ show jely2002/youtube-dl-gui
Open Video Downloader (formerly youtube-dl-gui) is a cross-platform desktop GUI for downloading videos and audio from YouTube and over 1000 other websites, using yt-dlp as its core engine. It provides a queue-based download workflow with features including format/codec selection, subtitle management, SponsorBlock integration, authentication (cookies, tokens, passwords), input filtering (date, size, match filters), and extensive output customization (containers, filename templates, directory organization). The application also manages automatic updates of both itself and its helper binaries (yt-dlp, ffmpeg, ffprobe, deno, AtomicParsley) via a signed manifest. The architecture is a Tauri 2 application with a Rust backend and Vue 3 frontend. The Rust backend handles yt-dlp process management, output parsing (progress, errors, metadata), binary updates, configuration persistence, and concurrent download scheduling. The frontend uses Pinia stores for state management, Vue Router for navigation, and composables for reusable logic. Communication between frontend and backend occurs through Tauri IPC commands and events, with a well-defined command structure in Rust and corresponding listener plugins in TypeScript. Key entry points include src/main.ts (Vue app bootstrap), src-tauri/src/main.rs (Rust entry), src/router.ts (route definitions), and src/plugins/tauriListeners.ts (event listener registration). The primary data flow begins when a user adds a URL: the frontend sends an IPC command to the backend, which runs yt-dlp to fetch metadata, parses the JSON output into structured models, and returns the data to the frontend. The user then configures download options, and the backend spawns a yt-dlp download process, streaming progress events back to the frontend for real-time UI updates. External dependencies include yt-dlp, ffmpeg, ffprobe, deno, AtomicParsley, the SponsorBlock API, system keyring (via Tauri stronghold), and Sentry for error reporting.
The LLM identified 4 files worth highlighting for reuse:
Implements a generic concurrent task dispatcher with semaphore-based concurrency limits and group-aware queuing. Used for both fetch and download pipelines. The design is isolated and could be extracted for any application needing bounded concurrent execution with priority groups.
Manages downloading, verifying (SHA-256 + Ed25519 signature), and extracting tool binaries (yt-dlp, ffmpeg, etc.) from archives. Supports atomic replacement to avoid corruption. The pattern of signed manifest verification and atomic extraction is reusable for any self-updating application.
Renders filename templates by replacing placeholders with metadata fields, with fallback values, character replacement, and sanitization. The design is self-contained and could be reused for any template-based output naming.
Defines an ApplyPatch trait that merges partial overrides into base settings. Used for per-download overrides of output, auth, network, and subtitle settings. The pattern is generic and could be extracted for any layered configuration system.