Compare commits

...

3 Commits

Author SHA1 Message Date
Oliver Atkinson
47842d92a9 fix file output namming issue 2024-05-08 15:12:38 -06:00
Oliver Atkinson
5120e40963 spell youtu.be correctly 2024-05-08 15:04:44 -06:00
Oliver Atkinson
cfde144d7f brighten placeholder text 2024-05-08 15:04:32 -06:00
2 changed files with 4 additions and 5 deletions

View File

@ -19,7 +19,7 @@ async fn main() -> Result<(), std::io::Error> {
// #[cfg(debug_assertions)] // #[cfg(debug_assertions)]
let filter = EnvFilter::builder() let filter = EnvFilter::builder()
.parse("server=debug,poem=debug,tokio=warn") .parse("server=trace,poem=debug,tokio=warn")
.expect("Could not create env filter.") .expect("Could not create env filter.")
; ;
@ -148,7 +148,7 @@ async fn download_url(Form(data): Form<Input>, state: Data<&Arc<AppData>>) -> po
.collect(); .collect();
} }
if domain == "youtube.com" || domain == "yout.be" { if domain == "youtube.com" || domain == "youtu.be" {
debug!("Downloading {} to {} format.", data.url, data.output.to_format()); debug!("Downloading {} to {} format.", data.url, data.output.to_format());
match Command::new("yt-dlp") match Command::new("yt-dlp")
@ -157,7 +157,6 @@ async fn download_url(Form(data): Form<Input>, state: Data<&Arc<AppData>>) -> po
.arg("--no-playlist") // if video or playlist, choose video .arg("--no-playlist") // if video or playlist, choose video
.arg("--restrict-filenames") // take special chars out .arg("--restrict-filenames") // take special chars out
.arg("--no-windows-filenames") // windows compatible file name .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(["--print","after_move:filename,id"]) // output filename
.args(["-f", OutputFormat::Video.to_format()]) // format selector .args(["-f", OutputFormat::Video.to_format()]) // format selector
.arg(data.url.clone()) .arg(data.url.clone())
@ -171,7 +170,7 @@ async fn download_url(Form(data): Form<Input>, state: Data<&Arc<AppData>>) -> po
match code { match code {
0 => { 0 => {
info!("Download done."); trace!("Download done.");
let mut out = YtDlpOutput::from(stdout); let mut out = YtDlpOutput::from(stdout);
// You can potentially do post-processing directly in yt-dlp // You can potentially do post-processing directly in yt-dlp

View File

@ -33,7 +33,7 @@ input[type="password"], [type="text"] {
input[type="text"]::placeholder { input[type="text"]::placeholder {
text-align: center; text-align: center;
color: #dddddd; color: #aaaaaa;
} }
textarea, input { textarea, input {