Compare commits

...

6 Commits

Author SHA1 Message Date
Oliver Atkinson
7346355351 add screenshot 2024-06-13 10:18:12 -06:00
Oliver Atkinson
c4065f3629 remove fixed todo 2024-05-08 15:18:20 -06:00
Oliver Atkinson
04304772bb add more notes 2024-05-08 15:16:50 -06:00
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
4 changed files with 9 additions and 7 deletions

View File

@@ -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`)
![Screenshot](./screenshot.png "Screenshot")

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -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

View File

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