$ account SakuraForgot
FluentYTDL is a Windows desktop application built with PySide6 and qfluentwidgets that provides a modern Fluent Design GUI for downloading videos and audio from YouTube and X (Twitter). It wraps yt-dlp as the core download engine and adds a rich layer of task management, error diagnostics, cookie-based authentication, subtitle handling, metadata embedding, and VR/360 video support. The application features a persistent SQLite task database, structured observability with JSONL event tracing, rule-based error classification, and a self-update mechanism with component version management. It is heavily internationalized (English and Simplified Chinese) and includes a comprehensive test suite covering UI, download pipeline, diagnostics, and observability contracts. Architecturally, the codebase is organized into distinct modules: core (config, dependency, update), auth (cookie sentinel, WebView2 provider), download (executor, workers, staging, quality guard), processing (metadata, subtitles, sponsorblock), diagnostics (rule engine, line collector), observability (events, traces, artifacts), and UI (pages, dialogs, delegates, components). The download pipeline is transactional with staging areas and manifests, ensuring atomicity and recovery. The observability layer is best-effort and never blocks business logic, emitting structured events for debugging and bug bundle export. The code demonstrates strong engineering practices: immutable dataclasses for plans, singleton managers with explicit initialization guards, strategy patterns for subtitle selection, and extensive use of signals for async UI updates. Key reusable components include the container compatibility resolver (deterministic output container decision), BCP-47 language matching with tiered resolution, the quality guard pattern for pre/post-download verification, the transactional staging pattern for file management, and the cookie runfile isolation pattern to prevent yt-dlp from corrupting truth-source cookies. The diagnostics rule engine and observability event system are also well-isolated and could be extracted for other yt-dlp wrapper projects.