]> git.plutz.net Git - serve0/commitdiff
fix status bar bug in some android versions, show status bar time when pausing
authorpaul <paul@plutz.net>
Sun, 17 Jul 2016 12:52:23 +0000 (12:52 +0000)
committerpaul <paul@plutz.net>
Sun, 17 Jul 2016 12:52:23 +0000 (12:52 +0000)
svn path=/trunk/; revision=142

pages/playctl.sh
static/common.css
templates/playctl.html.sh

index c57e338bea556bcf2f9b866cc8a9d7f239be6aa8..16e67a563a6b55d5bb376f4a5e0cc96c9690ca44 100755 (executable)
@@ -42,7 +42,7 @@ printf 'Refresh: 1\r\n'
 progress(){
   cr="$(printf \\r)"
 
-  tail --pid=$$ -c0 -f "$statusfile" \
+  tail --pid=$$ -c100 -f "$statusfile" \
   | while read -d "$cr" line; do
     [ $line = "BREAK" ] && exit 0
     printf '%s\n' "$line"
index bc027261332c31b427d6ea31999343d9ddc3db5b..858a1be147e8c830305d2f3237dee925cc92784b 100644 (file)
@@ -403,9 +403,12 @@ span.progress {
   border-top: 1px solid white;
   padding: 0;
   height: 1em;
+  overflow: hidden;
 }
-span.progress > * {
+span.progress > span {
   display: block;
+  position: absolute;
   text-align: center;
   background-color: #333;
+  min-width: 2em;
 }
index 62798500fab31c0c846dca270503235fd77b95e5..ec6467ee47f82bac4a3c47d25f2c517bff20bf94 100755 (executable)
@@ -99,12 +99,15 @@ cat <<EOF
 <div class="panel footer" id="foot">
   <a class="panel toggle" href="#tagger">Edit Tags</a>
 </div>
+<span class="progress">
 EOF
 
 cnt=0
 progress \
 | while read p t; do
-  printf '<span class="progress"><span style="width: %d%%;">%d:%02d</span></span>\n' "${p}" "$(($t / 60))" "$(($t % 60))"
+  printf '<span style="width: %d%%;">%d:%02d</span>\n' "${p}" "$(($t / 60))" "$(($t % 60))"
 done
 
+printf '</span>'
+
 # vi:set filetype=html: