summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-09-01 19:00:15 +0200
committerRasmus Steinke <rasi@xssn.at>2015-09-01 19:00:15 +0200
commite9f4fcd84ee0eb24a78f80e2e785a2683b343d27 (patch)
tree68d5eec4f774bb896e2d6d27bdce8a37313a6b3a
parentc2c543f80c83ea48c28146486f14cbaa35f9ac9e (diff)
downloadperl-app-clerk-e9f4fcd84ee0eb24a78f80e2e785a2683b343d27.tar.gz
perl-app-clerk-e9f4fcd84ee0eb24a78f80e2e785a2683b343d27.tar.xz
fixes for queue menu
-rwxr-xr-xclerk11
1 files changed, 10 insertions, 1 deletions
diff --git a/clerk b/clerk
index dd4c2ad..670bf87 100755
--- a/clerk
+++ b/clerk
@@ -643,6 +643,7 @@ TRACKDISPLAY=$(echo -e "< Return\n---\n> Load Playlist\n> Load RSS\n> Save Playl
exit
elif [[ $val -eq 13 ]]; then
+ unset last
if [[ $TRACKDISPLAY == *">"* || $TRACKDISPLAY == *"<"* || $TRACKDISPLAY == "---" ]]; then
mpc crop
else
@@ -651,28 +652,35 @@ TRACKDISPLAY=$(echo -e "< Return\n---\n> Load Playlist\n> Load RSS\n> Save Playl
fi
elif [[ $val -eq 16 ]]; then
+ unset last
mpc mv $POS $(echo $(( $POS + 1 )))
POS=$(echo $(( $POS +1 )))
elif [[ $val -eq 15 ]]; then
+ unset last
mpc mv $POS $(echo $(( $POS - 1 )))
- POS=$(echo $(( $POS - 1)));
+ POS=$(echo $(( $POS - 1 )));
elif [[ $val -eq 17 ]]; then
+ unset last
suspendPlaylist
elif [[ $val -eq 18 ]]; then
+ unset last
resumePlaylist
elif [[ $val -eq 12 ]]; then
+ unset last
dplayQueueSave
elif [[ $val -eq 14 ]]; then
+ unset last
if [[ $TRACKDISPLAY == *""* ]]; then
mpc clear
fi
elif [[ $val -eq 0 ]]; then
+ unset last
if [[ $TRACKDISPLAY == "< Return" ]]; then
dplayPrompt
elif [[ $TRACKDISPLAY == "> Load RSS" ]]; then
@@ -686,6 +694,7 @@ TRACKDISPLAY=$(echo -e "< Return\n---\n> Load Playlist\n> Load RSS\n> Save Playl
fi
elif [[ $val -eq 11 ]]; then
+ unset last
filename=$(mpc playlist --format '%position%\t%file%' | grep "^${POS}" | awk -F '\t' '{ print $2 }')
info=$(mpc --format '%artist%\t%album%\t%date%\t%track%\t%title%' search filename "${filename}")