summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2014-08-09 02:03:50 +0200
committerRasmus Steinke <rasi@xssn.at>2014-08-09 02:03:50 +0200
commit603546b61650227cf7754bdb5926cd0120688131 (patch)
tree28babb8ae4e8913969bfeb66b223976e3f904f9c /clerk
parent683d09ff695efce08f227cde2929ac919d9f7fb2 (diff)
downloadperl-app-clerk-603546b61650227cf7754bdb5926cd0120688131.tar.gz
perl-app-clerk-603546b61650227cf7754bdb5926cd0120688131.tar.xz
fixed small bug
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk5
1 files changed, 3 insertions, 2 deletions
diff --git a/clerk b/clerk
index f25c5c0..58172b0 100755
--- a/clerk
+++ b/clerk
@@ -637,11 +637,12 @@ playRandomTracks () {
mpc clear
n=0; while (( n++ < $value ));
do
- artist="$(mpc list albumartist | shuf | head -1)"
+ artist="$(mpc list albumartist | shuf -n 1)"
album="$(mpc list album albumartist "$artist" | shuf -n 1)"
title="$(mpc list title album "$album" albumartist "$artist" | shuf -n 1)"
- mpc find album "$album" albumartist "$artist" title "$title" | mpc add && mpc play
+ mpc find album "$album" albumartist "$artist" title "$title" | mpc add
done
+ mpc play
}