diff --git a/scripts/cmus-refresh.sh b/scripts/cmus-refresh.sh index 4945ea2..4461c35 100755 --- a/scripts/cmus-refresh.sh +++ b/scripts/cmus-refresh.sh @@ -2,6 +2,10 @@ # see https://github.com/cmus/cmus/issues/233 -cmus-remote -C clear -cmus-remote -C "add ~/Music" -cmus-remote -C "update-cache -f" +if cmus-remote -Q &>/dev/null ; then + cmus-remote -C clear + cmus-remote -C "add ~/Music" + cmus-remote -C "update-cache -f" +else + echo Start cmus first. +fi