Compare commits
6 Commits
458e83a83d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7346355351 | ||
|
|
c4065f3629 | ||
|
|
04304772bb | ||
|
|
47842d92a9 | ||
|
|
5120e40963 | ||
|
|
cfde144d7f |
@@ -4,7 +4,10 @@ Download youtube videos via a website interface. Makes it easier for everyone.
|
||||
|
||||
## Installation / Usage
|
||||
1) Install `ffmpeg` and `yt-dlp`. (Make sure they are on `$PATH`)
|
||||
2) Clone and run this project.
|
||||
2) Clone, build, and run this project.
|
||||
|
||||
## Notes / TODOs
|
||||
* Only `*.youtube.com` links work. Even though `*.yout.be` links *should*. smh
|
||||
* You need to be on the nightly channel of rust, at least for right now.
|
||||
* Make sure you open the firewall for the http connections to the selected port (default `3000`)
|
||||
|
||||

|
||||
|
||||
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
@@ -19,7 +19,7 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
|
||||
// #[cfg(debug_assertions)]
|
||||
let filter = EnvFilter::builder()
|
||||
.parse("server=debug,poem=debug,tokio=warn")
|
||||
.parse("server=trace,poem=debug,tokio=warn")
|
||||
.expect("Could not create env filter.")
|
||||
;
|
||||
|
||||
@@ -148,7 +148,7 @@ async fn download_url(Form(data): Form<Input>, state: Data<&Arc<AppData>>) -> po
|
||||
.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());
|
||||
|
||||
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("--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())
|
||||
@@ -171,7 +170,7 @@ async fn download_url(Form(data): Form<Input>, state: Data<&Arc<AppData>>) -> po
|
||||
|
||||
match code {
|
||||
0 => {
|
||||
info!("Download done.");
|
||||
trace!("Download done.");
|
||||
let mut out = YtDlpOutput::from(stdout);
|
||||
|
||||
// You can potentially do post-processing directly in yt-dlp
|
||||
|
||||
@@ -33,7 +33,7 @@ input[type="password"], [type="text"] {
|
||||
|
||||
input[type="text"]::placeholder {
|
||||
text-align: center;
|
||||
color: #dddddd;
|
||||
color: #aaaaaa;
|
||||
}
|
||||
|
||||
textarea, input {
|
||||
|
||||
Reference in New Issue
Block a user