ZYS43ILR4OXI7S2AYNGYSTK3IU2UVELIWVCCWDS7RVZQDSNJMDHQC
XMB6SWDNXYSYHQAUJMAQANOBAOHA7DY7BOUR5VNSRHBHIBINER4QC
XIHPYOWDLQY2MVMVUQPH23O3TBALRG4G2CHSLWSCAYMY5NVJ32WQC
H5MQEP35FJNDLARTAB7J5GEHRNBSL6RTHFUGURG5HIVGLCG4FGUAC
UIMZBURR7KOWSREO4GDH5C2LZDUTEZBKQNYWBYSFGUTRYJ4GKSNQC
Y6BVNXQ747WQKVB4JO3AHYOMBWNNJNPC6SG2UUCCZRIIXDMXJYDQC
JJ4SMY257MAHSJSZH5PJZMLBH3GJX5VKH2ZZSBGWLL7FWP7OA7TQC
6FJACP6KUOZ4HWK4PSS5PFPGDYXZSCAWSKIARWBDGCZTPJWXA62AC
fn launch_mpv(url: &str) -> io::Result<ExitStatus> {
Command::new("mpv")
.args(&["--audio-display=no", url])
.status()
fn launch_mpv(url: &str) -> Result<(), io::Error> {
if let Err(err) = Command::new("mpv").args(&["--audio-display=no", "--ytdl=no", url]).status() {
match err.kind() {
io::ErrorKind::NotFound => {
eprintln!("Couldn't open mpv\nTrying vlc...");
return Err(err);
},
_ => eprintln!("Error: {}", err),
}
}
Ok(())
fn handle_launch_mpv_error(err: io::Error) {
match err.kind() {
io::ErrorKind::NotFound => eprintln!("mpv not found in PATH, is it installed?"),
_ => eprintln!("Error: {}", err),
fn launch_vlc(url: &str) {
if let Err(err) = Command::new("vlc").args(&["-I ncurses", url]).status() {
match err.kind() {
io::ErrorKind::NotFound => {
eprintln!("vlc not found in PATH\nAborting...");
},
_ => eprintln!("Error: {}", err),
}