mirror of
https://github.com/mrfluffy-dev/kami.git
synced 2026-01-17 12:50:32 +00:00
13 lines
340 B
Rust
13 lines
340 B
Rust
pub fn open_video(link: (String, String)) {
|
|
let title = link.1;
|
|
let title = title.replace("-", " ");
|
|
let arg: String = format!("--force-media-title={}", title);
|
|
let _ = std::process::Command::new("mpv")
|
|
.arg(link.0)
|
|
.arg(arg)
|
|
.output()
|
|
.expect("failed to open mpv");
|
|
|
|
// clear terminal
|
|
}
|