svn path=/trunk/; revision=188
genlist(){
case "$order" in
- Date) find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%T@ %f\n' |sort -r |cut -d\ -f2- |egrep -i "$file_pattern";;
- Length) sed -sn 1p "${_DATA}"/meta/*.meta |sort -n |sed -r 's;^[0-9\t]+\t;;';;
- Name) find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%f\n' |sort -f |egrep -i "$file_pattern";;
+ Date)
+ find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%T@ %f\n' \
+ | sort -r \
+ | cut -d\ -f2- \
+ | egrep -i "$file_pattern"
+ ;;
+ Length)
+ sed -sn 1p "${_DATA}"/meta/*.meta \
+ | sort -n \
+ | sed -r 's;^[0-9\t]+\t;;'
+ | while read file; do
+ [ -f "${_DATA}/videos/${file}" ] && printf '%s\\n' "$file"
+ done
+ ;;
+ Name)
+ find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%f\n' \
+ | sort -f \
+ | egrep -i "$file_pattern"
+ ;;
esac
}