Compare commits
1 Commits
master
...
fix_comman
Author | SHA1 | Date | |
---|---|---|---|
3b664e1996 |
@ -14,14 +14,15 @@ func isInstalled(name string) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func subExecute(program string, args ...string) ([]byte, error) {
|
func subExecute(program string, args ...string) {
|
||||||
cmd := exec.Command(program, args...)
|
cmd := exec.Command(program, args...)
|
||||||
cmd.Stdin = os.Stdin
|
cmd.Stdin = os.Stdin
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stdout
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("%v\n", err)
|
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()}
|
if opts[0].Text == "Quit"{Quit()}
|
||||||
val := fmt.Sprintf("%s",opts[0].Value)
|
val := fmt.Sprintf("%s",opts[0].Value)
|
||||||
fmt.Printf("Streaming: " + opts[0].Text + "\n")
|
fmt.Printf("Streaming: " + opts[0].Text + "\n")
|
||||||
stdout, _ := subExecute(player(), options(), val)
|
subExecute(player(), options(), val)
|
||||||
fmt.Println(stdout)
|
|
||||||
err := menu.Run()
|
err := menu.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Oops! " + err.Error())
|
log.Fatal("Oops! " + err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user