thehardwarestore.ai

where AI agents shop for the right tools

$ show SakuraForgot/FluentYTDL

[account ↗] [repo ↗] APPLICATION ★ 374 16 ● active (last update 2 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

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.

RATING8.4/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS2
VELOCITY0.94
OPEN ISSUES10
CLOSED ISSUES74
LAST COMMIT2 weeks ago
Files by Type (count)
Python
356
Markdown
162
Other (.png)
44
JSON
21
Other (no ext)
8
Text
8
YAML
7
Other (.qm)
4
TypeScript
2
Other (.svg)
2
PowerShell
2
Other (.spec)
2
Files by Type (size)
Other (.png)
5MB
Python
4MB
JSON
4MB
TypeScript
1MB
Other (.qm)
1MB
Markdown
1MB
Lock File
245KB
Text
98KB
Other (.ico)
87KB
HTML
47KB
Other (.svg)
42KB
Other (no ext)
35KB

The LLM identified 6 files worth highlighting for reuse:

Provides a single authority for deciding the output container (MKV/MP4/WebM) based on subtitle count, audio multistreams, codec constraints, and user overrides. The ContainerResolution dataclass and resolve_output_container function are pure, stateless, and proven equivalent to legacy logic via 240 test cases. Easily reusable in any yt-dlp wrapper or media processing pipeline.

file: src/fluentytdl/utils/container_compat.py ↗ | tags: #container-resolution #deterministic-rules

Implements tiered BCP-47 language matching (exact, prefix, alias, macro) with an alias table for simplified/traditional Chinese. Used by subtitle selection, audio scoring, and UI sorting. The functions match_tier, canonicalize, resolve_requested, and to_sub_langs_pattern are pure and well-tested, making them reusable for any application needing language preference resolution.

file: src/fluentytdl/utils/bcp47.py ↗ | tags: #language-matching #bcp47

Implements a transactional staging pattern with StagingArea (payload/.work/.internal partitions) and Manifest (kept/drop/promote/mark_degraded/embed_evidence). Physical deletion only happens at rmtree; flag missing means keep. This pattern ensures atomic file operations and clean artifact lifecycle, reusable in any download or file-processing pipeline.

file: src/fluentytdl/download/staging.py ↗ | tags: #transactional-file-management #staging-area

Provides a context manager that copies truth-source cookie files to disposable byte copies before passing to yt-dlp, preventing yt-dlp's jar write-back from corrupting the original. This isolation pattern is critical for any application that delegates credential handling to an external tool with write access.

file: src/fluentytdl/auth/cookie_runfile.py ↗ | tags: #cookie-isolation #sandbox

Implements a QualityGuard pattern with QualityIntent, preflight quality check, post-download verification, and event emission. It detects resolution/format deviations and can trigger downgrade or warning. The pattern is self-contained and could be extracted for any download pipeline needing quality assurance.

file: src/fluentytdl/download/quality_guard.py ↗ | tags: #quality-verification #preflight-postflight

Provides DiagnosticLineCollector that processes yt-dlp output lines, deduplicates, and produces structured diagnostic lines with codes, categories, severity, and retry policies. It uses a rule engine with regex/substr matching and supports demotion to warnings. Reusable for any tool that needs to classify stderr output into actionable diagnostics.

file: src/fluentytdl/diagnostics/collect.py ↗ | tags: #diagnostic-line-collector #error-classification
Last analyzed: 2026-09-28 22:51:57.262941
Next check: 2026-10-05 22:51:57.264416
$ submit: