thumb="$(urlsafe "thumbs/$info.jpg")"
linkinfo="$(urlsafe "$info")"
htmlinfo="$(htmlsafe "$info")"
+ attrinfo="$(attribsafe "$info")"
minutes="$(printf "%d:%02d" $(($length / 60)) $(($length % 60)) )"
tee "$cache" <<VIDEOend
- <li class="thumb">
+ <li id="$attrinfo" class="thumb">
<button class="watchlink" name="${linkinfo}" formaction="?action=watch&i=${linkinfo}">
<img src="$thumb" alt="Preview not yet available">
</button>
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"