summaryrefslogtreecommitdiff
path: root/src/audio/mpv.rs
blob: fde27112a4d66d5f2663e0fae2744c028ca975de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use std::process::Command;

pub struct Mpv {}

impl Mpv {
    pub async fn play(&self, url: &str) {
        Command::new("mpv")
            .args([url])
            .output()
            .expect("Failed to start mpv, make sure it is installed.");
    }
}