summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-09-01 03:28:50 +0200
committerRasmus Steinke <rasi@xssn.at>2015-09-01 03:28:50 +0200
commit873a5cfa75feccbe834e05ea8ff743685113f10a (patch)
treeff62ab0878eeaaf51adf57f42f6464dd30f6039f /clerk
parentd4e2dc01e58efabe6d1abd6267ec3940f0bd9931 (diff)
downloadperl-app-clerk-873a5cfa75feccbe834e05ea8ff743685113f10a.tar.gz
perl-app-clerk-873a5cfa75feccbe834e05ea8ff743685113f10a.tar.xz
make moving of songs work without previous delection
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk6
1 files changed, 4 insertions, 2 deletions
diff --git a/clerk b/clerk
index f25c099..38ac756 100755
--- a/clerk
+++ b/clerk
@@ -585,6 +585,8 @@ dplayQueue () {
if [[ "$POS" =~ $re ]]; then
if [[ $last != $(mpc -f '%file%' playlist | tail -1) ]]; then
POS=$(echo $(( $POS + 5 )))
+ elif [[ -z $last ]]; then
+ POS=$(echo $(( $POS +2 )))
else
POS=$(echo $(( $POS + 6 )))
fi
@@ -632,11 +634,11 @@ TRACKDISPLAY=$(echo -e "< Return\n---\nLoad Playlist\nLoad RSS\nSave Playlist\n-
elif [[ $val -eq 16 ]]; then
mpc mv $POS $(echo $(( $POS + 1 )))
- POS=$POS;
+ POS=$(echo $(( $POS +1 )))
elif [[ $val -eq 15 ]]; then
mpc mv $POS $(echo $(( $POS - 1 )))
- POS=$(( $POS - 2));
+ POS=$(echo $(( $POS - 1)));
elif [[ $val -eq 17 ]]; then
suspendPlaylist