refactor: improve error structure and add custom executable path

This commit is contained in:
nvrl committed 2026-03-22 12:37:01 +01:00
1 parent 8ef831db11
commit 1c701d1e61
2 files changed
+37 -13

No files matched your search

+5 -2
View File
@@ -8,6 +8,9 @@ pub enum YtDlpError {
UTF8Error(#[from] std::string::FromUtf8Error),
#[error("failed to parse JSON: {0}")]
JsonError(#[from] serde_json::Error),
#[error("yt-dlp exited with error: {0}")]
Failure(String),
#[error("yt-dlp exited with status {code:?}: {stderr}")]
Failure {
code: Option<i32>,
stderr: String,
},
}