X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=actions%2Fplayctl.sh;h=9af8f7b8d0c5d9af813ad8eb451feb41aef2721f;hb=e2388ebb332a514f070ec5a668f23b08dda83546;hp=6dc138f1561611829149b5991a45e3852d0e9490;hpb=e5267e1298f4ffec140c5b3ef43be36079e63c3f;p=serve0 diff --git a/actions/playctl.sh b/actions/playctl.sh index 6dc138f..9af8f7b 100755 --- a/actions/playctl.sh +++ b/actions/playctl.sh @@ -36,11 +36,7 @@ if [ "${_GET[api]}" = progress ]; then [ "$line" = "BREAK" ] && exit 0 printf '%s\n' "$line" done \ - | sed -urn '1~12s;^.* V: *+([0-9]+)(\.[0-9]+) A-V:.*$;\1;p' \ - | while read m; do - [ "$m" != "$previous" ] && printf "%d %d\n" "$(($m * 100 / ${length:--1}))" "$m" - previous="$m" - done + | sed -urn '1~12s;^.* V: *+([0-9]+)(\.[0-9]+) A-V:.*$;\1;p' exit 0 elif [ "${_GET[api]}" = volume ]; then printf 'Content-Type: text/plain\r\n\r\n'