update mpv command

This commit is contained in:
CptCaptain 2021-04-11 15:31:49 +02:00
parent d2ae892a70
commit 7ef6d0e767

View File

@ -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");
}