]> git.plutz.net Git - serve0/blobdiff - pages/list.sh
ignore zero size cache files
[serve0] / pages / list.sh
index 0ee2282bb32eece0369c3ad68e681c85c4c92702..a9eeb331720e45d97c1ce2e8d183287fc12c6c31 100755 (executable)
@@ -78,10 +78,10 @@ _printVideo(){
 
     tee "$cache" <<VIDEOend
       <li class="thumb">
-        <a class="watchlink" name="${linkinfo}" href="?action=watch&i=${linkinfo}">
+        <button class="watchlink" name="${linkinfo}" formaction="?action=watch&i=${linkinfo}">
           <img src="$thumb" alt="Preview not yet available">
-        </a>
-        <h2>${htmlinfo}</h2>
+        </button>
+        <h2><a href="?action=watch&i=${linkinfo}">${htmlinfo}</a></h2>
         
         <input type="checkbox" name="tagsel" value="${htmlinfo}">
         <span class="info property">${minutes}min</span>
@@ -103,7 +103,7 @@ genlist(){
 selectionlist() {
   cachebase="?o=${order}&s=${search//\//}&f=${filter//\//}"
   cache="${_DATA}/cache/${cachebase}"
-  if [ "$cache" -nt ${_DATA}/videos -a "$cache" -nt ${_DATA}/meta ]; then
+  if [ -s "$cache" -a "$cache" -nt ${_DATA}/videos -a "$cache" -nt ${_DATA}/meta ]; then
     cat "$cache"
   else
     filterex="s;^([0-9]+\t){3}(.+)\n.*$;\2;p"