summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2016-06-07 14:19:44 +0200
committerRasmus Steinke <rasi@xssn.at>2016-06-07 14:19:44 +0200
commitb266123b3107e9b47fd32e2b1e42f2c1cd0dd257 (patch)
tree2e02a12f7b1c5ad47ef0c4956a0e47a19261a94b /clerk
parentc33bfdecbbda2eb0eb5d945d8c2f1dabf2a08b7b (diff)
downloadperl-app-clerk-b266123b3107e9b47fd32e2b1e42f2c1cd0dd257.tar.gz
perl-app-clerk-b266123b3107e9b47fd32e2b1e42f2c1cd0dd257.tar.xz
fix insert and play
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk8
1 files changed, 5 insertions, 3 deletions
diff --git a/clerk b/clerk
index c306360..a43f6d0 100755
--- a/clerk
+++ b/clerk
@@ -1521,9 +1521,11 @@ ${line2}</span>"
album_entry="$firstline"
elif [[ $val -eq 14 ]]; then
- mpc clear;
- mpc findadd date "$date" album "$album" albumartist "$artist";
- mpc searchplay "${album}"
+ currentid=$(mpc current -f "%position%")
+ echo -e "$ALBUM" | uniq | while read line; do
+ mpc insert "$(echo -e "${line}" | awk -F '\t' '{ print $NF }')"
+ done
+ mpc play "$(echo "$(( $currentid + 1 ))")"
album_entry="$firstline"
elif [[ $val -eq 1 ]]; then