summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2014-08-07 22:59:19 +0200
committerRasmus Steinke <rasi@xssn.at>2014-08-07 22:59:19 +0200
commit5311b1f5212830bbdd4ef745c25bcbc1395e0529 (patch)
treebf1509790ba74a57d14b7021afbc8e0e2d7bf19e /clerk
parent8303a5d1c8b00d587661815308aed7e99b20353d (diff)
downloadperl-app-clerk-5311b1f5212830bbdd4ef745c25bcbc1395e0529.tar.gz
perl-app-clerk-5311b1f5212830bbdd4ef745c25bcbc1395e0529.tar.xz
removed useless head
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk8
1 files changed, 4 insertions, 4 deletions
diff --git a/clerk b/clerk
index aa24346..8bc855d 100755
--- a/clerk
+++ b/clerk
@@ -628,8 +628,8 @@ loadRandomRating () {
playRandomAlbum () {
mpc clear
- artist="$(mpc list "$mpd_artist" | shuf | head -1)"
- album="$(mpc list album "$mpd_artist" "$artist" | shuf | head -1)"
+ artist="$(mpc list "$mpd_artist" | shuf -n 1)"
+ album="$(mpc list album "$mpd_artist" "$artist" | shuf -n 1)"
mpc find album "$album" "$mpd_artist" "$artist" | mpc add && mpc play
}
@@ -638,8 +638,8 @@ playRandomTracks () {
n=0; while (( n++ < $value ));
do
artist="$(mpc list artist | shuf | head -1)"
- album="$(mpc list album artist "$artist" | shuf | head -1)"
- title="$(mpc list title album "$album" artist "$artist" | shuf | head -1)"
+ album="$(mpc list album artist "$artist" | shuf -n 1)"
+ title="$(mpc list title album "$album" artist "$artist" | shuf -n 1)"
mpc find album "$album" artist "$artist" title "$title" | mpc add && mpc play
done
}