summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2014-08-10 22:59:24 +0200
committerRasmus Steinke <rasi@xssn.at>2014-08-10 22:59:24 +0200
commit76df2878c311e700866d866201b8d092f0e795cb (patch)
tree1a2ba6d99692eacb4ba426b05d6ea7cb341cf1c2 /clerk
parent11040c0a610874e734ae2cb36febdaa6be2eee3e (diff)
downloadperl-app-clerk-76df2878c311e700866d866201b8d092f0e795cb.tar.gz
perl-app-clerk-76df2878c311e700866d866201b8d092f0e795cb.tar.xz
made resume time-based
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk6
1 files changed, 3 insertions, 3 deletions
diff --git a/clerk b/clerk
index 06d9aa0..3fa3d5d 100755
--- a/clerk
+++ b/clerk
@@ -389,9 +389,9 @@ done < <(echo -e "0 Return to Playlist Menu\n---\n$(cat $HOME/.config/clerk/pod
}
suspendPlaylist () {
- playing=$(! mpc status | grep playing)
- state=$(mpc status | tail -2 | head -1)
- time=$(echo "$state" | awk -F ' ' '{ print $NF }' | sed 's/[)(]//g')
+ playing=$(! mpc status | grep 'playing\|paused')
+ state=$(mpc status | sed '2!d')
+ time=$(echo "$state" | awk -F ' ' '{print $3 }' | awk -F '/' '{print $1 }')
position=$(mpc current --format '%position%')
if [[ -z "$playing" ]]; then
echo "mpd is not playing"