no need to make the menu handle the player
This commit is contained in:
parent
eb19d5280a
commit
3b664e1996
@ -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)
|
||||
}
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user