master
CptCaptain 4 years ago
parent f572b19942
commit fdf6b84d3f
  1. 3
      src/main.rs

@ -16,7 +16,8 @@ struct Video {
fn new(video: Form<Video>) -> Redirect { fn new(video: Form<Video>) -> Redirect {
if video.link.starts_with("https://"){ if video.link.starts_with("https://"){
Command::new("/bin/env") Command::new("/bin/env")
.args(&["DISPLAY:=0", "bash", "-c", &format!("mpv {link}", link=&video.link).to_string()]) // .args(&[&video.link])
.args(&["DISPLAY=:0", "bash", "-c", &format!("mpv {link}", link=&video.link).to_string()])
.output() .output()
.expect("Failed to execute command"); .expect("Failed to execute command");
} }

Loading…
Cancel
Save