diff options
| author | Julian Hurst <julian.hurst92@gmail.com> | 2020-08-03 14:55:47 +0200 |
|---|---|---|
| committer | Julian Hurst <julian.hurst92@gmail.com> | 2020-08-03 14:55:47 +0200 |
| commit | cd91863abc829c47b15ea1a902e88507efba96ec (patch) | |
| tree | 714d5e43e58933c2b5278ec048c9655cbcd40d9e /statusbar.go | |
| parent | 9b836710ad52ea06a84e919774e612170bf03292 (diff) | |
| download | statusbar-cd91863abc829c47b15ea1a902e88507efba96ec.tar.gz | |
Be more tolerant of errors with the generic player
Diffstat (limited to 'statusbar.go')
| -rw-r--r-- | statusbar.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/statusbar.go b/statusbar.go index 47b04f9..8480995 100644 --- a/statusbar.go +++ b/statusbar.go @@ -180,7 +180,7 @@ func (player GenericPlayer) nowPlaying() string { cmd := exec.Command(split[0], args...) out, err := cmd.Output() if err != nil { - panic(err) + return "" } sOut := string(out) sOut = strings.ReplaceAll(sOut, "\n", "") @@ -202,7 +202,7 @@ func (player GenericPlayer) status() int { cmd := exec.Command(split[0], args...) out, err := cmd.Output() if err != nil { - panic(err) + return 2 } sOut := string(out) sOut = strings.ReplaceAll(sOut, "\n", "") |
