3 [ -n "$include_indexmeta" ] && return 0
6 . "$_EXEC/cgilite/storage.sh"
7 file_pattern='^.*\.(mov|ts|mpg|mpeg|mp4|m4v|avi|mkv|flv|sfv|wmv|ogm|ogv|webm|iso|rmvb)$'
24 | mplayer -input nodefault-bindings -nosound -vo null -identify -frames 0 "$video" 2>&- \
26 s:ID_LENGTH=(.*)(\..*)$:\1:p;
27 s:ID_VIDEO_HEIGHT=(.*):\1:p;
28 s:ID_VIDEO_WIDTH=(.*):\1:p;' \
32 printf '%i\t%i\t%i\ttags=\tcomment=\t%s\n' \
33 "${l-0}" "${w-0}" "${h-0}" "$(meta_name "$video")"
39 meta="${file%/*}/.index/meta"
40 name="$(meta_name "$file")"
42 if [ -d "${meta%/meta}" ] && LOCK "$meta"; then
43 grep -vF " ${name}" "$meta" >"$meta.tmp"
46 mv "$meta.tmp" "$meta"
54 meta="${file%/*}/.index/meta"
56 if [ -d "${meta%/meta}" ]; then
57 grep -aF " $(meta_name "$file")" "$meta" \
58 | grep -m1 -xE '[0-9]+ [0-9]+ [0-9]+ tags=[^ ]* comment=[^ ]* .+' \
61 printf '0\t0\t0\ttags=\tcomment=\t\r'
68 meta="${dir}/.index/meta"
70 if [ -d "$dir/.index" -a \! -f "$meta" ] && LOCK "$meta"; then
71 touch "$meta" # preliminary touch to prevent concurrent generators
72 find "$dir" -type f -mindepth 1 -maxdepth 1 \
73 | grep -E "$file_pattern" \
74 | while v="$(line)"; do
79 elif [ -d "$dir/.index" -a "$dir" -nt "$meta" ] && LOCK "$meta"; then
81 find "$dir" -type f -mindepth 1 -maxdepth 1 \
82 | grep -E "$file_pattern" \
83 | while v="$(line)"; do
84 if [ "$v" -nt "$meta" ]; then
85 grep -qF " $(meta_name "$v")" "$meta" \