|
|
|
@ -21,7 +21,7 @@ fn new(video: Form<Video>) -> Redirect { |
|
|
|
|
if part.starts_with("https://"){ |
|
|
|
|
Command::new("/bin/env") |
|
|
|
|
// .args(&[&video.link])
|
|
|
|
|
.args(&["DISPLAY=:0", "bash", "-c", &format!("mpv {link}", link=&part).to_string()]) |
|
|
|
|
.args(&["DISPLAY=:0", "bash", "-c", &format!("mpv --ytdl-format='bestvideo[height<=?4050]+bestaudio/best' {link}", link=&part).to_string()]) |
|
|
|
|
.output() |
|
|
|
|
.expect("Failed to execute command"); |
|
|
|
|
} |
|
|
|
|