fi
}
+alias urlsave="sed 's:%:\%25:g;s:\?:\%3F:g;s:&:\%26:g;s:'\'':\%27:g;s: :\%20:g'"
+
_printVideo(){
info="$1"
cache="${_DATA}/cache/$info.cache"
[ -r "$meta" ] || ". ${_EXEC}/helpers/genmeta.sh" "$video" "$meta"
[ -r "$thumb" ] || ". ${_EXEC}/helpers/genthumb.sh" "$video" "$thumb"
[ -L "$mpfake" ] || ln -s "../videos/$info" "$mpfake"
- video="$(echo "videos/$info" |sed 's/\?/\%6F/g;s/&/\%26/g;s/'\''/%27/g')"
- thumb="$(echo "thumbs/$info.jpg" |sed 's/\?/%6F/g')"
- mpfake="$(echo "$info" |sed -r 's:^(.*)\.[a-zA-Z0-9]{3,4}$:mp4/\1.mp4:' |sed 's/\?/%6F/g')"
+ video="$(echo "videos/$info" |urlsave)"
+ thumb="$(echo "thumbs/$info.jpg" |urlsave)"
+ mpfake="$(echo "$info" |sed -r 's:^(.*)\.[a-zA-Z0-9]{3,4}$:mp4/\1.mp4:' |urlsave)"
[ "$(($length % 60))" -lt 10 ] &&\
minutes="$(($length / 60)):0$(($length % 60))" ||\
minutes="$(($length / 60)):$(($length % 60))"
- linkinfo="$(echo -n "$info" |sed -r 's:%:%25:g;s:\&:%26:g;')"
+ linkinfo="$(echo -n "$info" |urlsave)"
tee "$cache" <<VIDEOend
<li class="thumb">
<a class="watchlink" name="$linkinfo" href="?action=watch&i=$linkinfo">