Compare commits

...

1 Commits

Author SHA1 Message Date
Greg Gauthier 3b664e1996 no need to make the menu handle the player 2021-03-20 19:41:58 +00:00
2 changed files with 5 additions and 5 deletions

View File

@ -14,14 +14,15 @@ func isInstalled(name string) bool {
return true
}
func subExecute(program string, args ...string) ([]byte, error) {
func subExecute(program string, args ...string) {
cmd := exec.Command(program, args...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Stderr = os.Stdout
err := cmd.Run()
if err != nil {
fmt.Printf("%v\n", err)
}
return cmd.CombinedOutput()
outp, _ := cmd.CombinedOutput()
fmt.Println(outp)
}

View File

@ -29,8 +29,7 @@ func RadioMenu(stations []stationRecord) *wmenu.Menu {
if opts[0].Text == "Quit"{Quit()}
val := fmt.Sprintf("%s",opts[0].Value)
fmt.Printf("Streaming: " + opts[0].Text + "\n")
stdout, _ := subExecute(player(), options(), val)
fmt.Println(stdout)
subExecute(player(), options(), val)
err := menu.Run()
if err != nil {
log.Fatal("Oops! " + err.Error())