@@ 3,6 3,8 @@ use std::fs;
use std::io::prelude::*;
use std::path::Path;
+const PROGRAM_NAME: &str = "wtwitch";
+
// Twitch API information
// This API key is intended to be used for wtwitch only -- do not use this API
// key for any other reason!
@@ 149,16 151,14 @@ fn watch(args: Vec<String>) {
use std::process;
if cfg!(target_os = "windows") {
- process::Command::new("cmd")
- .args(&["/C", "echo hello"])
- .spawn()
- .expect("failed to execute process")
+ panic!("{} does not yet support launching a stream on Windows", PROGRAM_NAME);
} else {
let streamlink_command = format!("streamlink -p mpv --twitch-disable-ads \"https://www.twitch.tv/{}\" best", args[2]);
process::Command::new("sh")
.arg("-c")
.arg(streamlink_command)
+ .stdout(process::Stdio::null())
.spawn()
- .expect("failed to execute process")
+ .expect("Failed to open streamlink")
};
}=
\ No newline at end of file