Compare commits
3 Commits
458e83a83d
...
47842d92a9
Author | SHA1 | Date | |
---|---|---|---|
|
47842d92a9 | ||
|
5120e40963 | ||
|
cfde144d7f |
@ -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
|
||||||
|
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user