From 593454e12c6337a9483c86d3ab92351e2ceca55b Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 24 Mar 2022 15:49:43 +0100 Subject: Learning in progress --- src/c_player.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/c_player.go') diff --git a/src/c_player.go b/src/c_player.go index 539fe9c..399f90e 100644 --- a/src/c_player.go +++ b/src/c_player.go @@ -49,15 +49,16 @@ package main import ( "fmt" - "log" + // "log" "os/exec" ) -func exec_player(file string) { - fmt.Println("Playing: " + file) - cmd := exec.Command("mpv", "--really-quiet", file) - err := cmd.Run(); - if err != nil { - log.Fatal(err) - } +func exec_player(args ...string) { + fmt.Println("Playing: " + args[len(args) - 1]) + cmd := exec.Command(args) + // cmd := exec.Command("mpv", file) + // err := cmd.Run(); + // if err != nil { + // log.Fatal(err) + // } } -- cgit v1.2.3