diff --git a/src/main.rs b/src/main.rs index c836567..8fc37b8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,13 +17,13 @@ use url::Url; #[tokio::main] async fn main() -> Result<(), std::io::Error> { - #[cfg(debug_assertions)] + // #[cfg(debug_assertions)] let filter = EnvFilter::builder() - .parse("server=trace,poem=debug,tokio=warn") + .parse("server=debug,poem=debug,tokio=warn") .expect("Could not create env filter.") ; - #[cfg(debug_assertions)] + // #[cfg(debug_assertions)] tracing_subscriber::fmt::fmt() .with_max_level(Level::TRACE) .with_target(true) @@ -154,9 +154,11 @@ async fn download_url(Form(data): Form, state: Data<&Arc>) -> po match Command::new("yt-dlp") .arg("--quiet") // shut up .arg("--no-warnings") // shut up again - .arg("--windows-filenames") // windows compatible file name .arg("--no-playlist") // if video or playlist, choose video - .args(["--print","after_move:filename,id"]) // output filename + .arg("--restrict-filenames") // take special chars out + .arg("--no-windows-filenames") // windows compatible file name + .args(["--output","id"]) // if video or playlist, choose video + .args(["--print","after_move:filename,id"]) // output filename .args(["-f", OutputFormat::Video.to_format()]) // format selector .arg(data.url.clone()) .output()