gen_thumb(){
file="$1"; thumb="$2";
- if [ ! -e "$thumb" ] && [ -f "$file" ]; then
+ if [ "${file%.part}" = "${file}" ] && [ ! -s "$thumb" ] && [ -s "$file" ]; then
l="$(
printf '' \
| mplayer -input nodefault-bindings -nosound -vo null -identify -frames 0 "$file" 2>&- \
mv "${tmp}/00000001.jpg" "$thumb"
rm -r "${tmp}"
-
- elif [ ! -e "$thumb" ]; then
- touch "$thumb"
fi
}