somafm 0.5.1

A Rust-based command line player for SomaFM radio
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.");
    }
}