]> git.plutz.net Git - serve0/blobdiff - templates/playctl.html.sh
send reference to return page when playing externally
[serve0] / templates / playctl.html.sh
index 9152db4e4f0f637d9819c2d61c616ecb4dcc2e05..40244a3726a09d6078f26c92a82b362da4e33558 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2014 - 2016 Paul Hänsch
+# Copyright 2014 - 2017 Paul Hänsch
 #
 # This file is part of Serve0
 # 
@@ -29,7 +29,7 @@ cat <<EOF
   </select>
   <!-- input type="submit" name="submit" value="Find" -->
 
-  <a class="panel" href="${info:+?p=list&amp;${page_this}}${directory:+?p=browse&amp;d=${directory}&amp;${page_this}}#$(urlsafe $info)">Dismiss</a>
+  <a class="panel" href="${_GET[w]:-${info:+?p=list&amp;${page_this}}${directory:+?p=browse&amp;d=${directory}&amp;${page_this}}#$(urlsafe $info)}">Dismiss</a>
 </form>
 
 <input type=radio name=topmenu id=btn_playctl><label for=btn_playctl>Audio</label>
@@ -75,7 +75,13 @@ cat <<EOF
     </fieldset>
     <fieldset class="volume">
       $(for n in $(seq 0 5 100); do
-        printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' "$([ "$volume" = "$n" ] && printf selected)" "$n"
+        printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' \
+          "$( [ "$n" = "$volume" ] && printf selected
+              [ "$n" = "$((volume - 10))" ] && printf llselected
+              [ "$n" = "$((volume -  5))" ] && printf  lselected
+              [ "$n" = "$((volume +  5))" ] && printf  gselected
+              [ "$n" = "$((volume + 10))" ] && printf ggselected
+           )" "$n"
       done)
     </fieldset>
   </form>