feat: capture yt-dlp stderr on download failures for debugging
Add StderrLog field to DownloadJob and collect all stderr lines during download. Log the captured stderr output when a download fails to help diagnose exit code 2 errors (geo-restrictions, auth, etc.).
This commit is contained in:
@@ -315,7 +315,7 @@ func (c *Client) StartDownload(job *domain.DownloadJob, downloadDir string) (<-c
|
||||
<-progressDone
|
||||
if err != nil {
|
||||
job.Status = domain.StatusFailed
|
||||
slog.Error("download failed", "url", job.URL, "error", err)
|
||||
slog.Error("download failed", "url", job.URL, "error", err, "stderr", job.StderrLog)
|
||||
} else {
|
||||
job.Status = domain.StatusCompleted
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user