X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=thumbnail.sh;fp=thumbnail.sh;h=f6d212ca8bedb5845d2841ed2151aa31206ff61f;hb=d1d011e4f678f942777ebe088c42b9b0ec75ef83;hp=143077640c049f1c35dbfbc0584607855cf6986a;hpb=fdc8b1be6f0f22550de83cdca95c5067e1dff17d;p=serve0 diff --git a/thumbnail.sh b/thumbnail.sh index 1430776..f6d212c 100644 --- a/thumbnail.sh +++ b/thumbnail.sh @@ -6,7 +6,7 @@ include_thumbnails="$0" 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>&- \ @@ -35,8 +35,5 @@ gen_thumb(){ mv "${tmp}/00000001.jpg" "$thumb" rm -r "${tmp}" - - elif [ ! -e "$thumb" ]; then - touch "$thumb" fi }