Classify yt-dlp failures into actionable buckets (2.3)
When a job fails, today the user sees a raw stderr line — often something like "ERROR: [youtube] dQw4w9WgXcQ: Sign in to confirm you're not a bot" that doesn't tell a non-expert what to do. New src/error_class.rs scans the failed job's log buffer for the nine well-known yt-dlp fingerprints and returns: - an ErrorClass enum (rate-limited, members-only, geo-blocked, not-found, codec-missing, disk-full, network-error, bad-cookies, other) - a one-line human-readable suggested action paired with each class Auto-populated in Job::drain when state transitions to Failed. Exposed on JobSnapshot as error_class + error_hint. Rendered in the web UI Downloads modal (red badge + hint box) and the desktop downloads panel (colored label + hint text). Other (no fingerprint matched) is filtered out of the badge so the existing raw last_line keeps doing the talking for unknown failures. Includes 10 unit tests covering each pattern + the walks-from-end priority case. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
a8b14f250a
commit
d9a7007f34
6 changed files with 365 additions and 8 deletions
|
|
@ -18,6 +18,7 @@ mod config;
|
|||
mod database;
|
||||
mod download_options;
|
||||
mod downloader;
|
||||
mod error_class;
|
||||
mod library;
|
||||
mod maintenance;
|
||||
mod platform;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue