Zachary Kotlarek 10 лет назад
Родитель
Сommit
ad0bede77a
1 измененных файлов с 7 добавлено и 5 удалено
  1. 7 5
      toMKV.sh

+ 7 - 5
toMKV.sh

@@ -28,15 +28,17 @@ if [ -z "${inFile}" ] || [ ! -e "${inFile}" ]; then
 	exit 1
 fi
 
+# AVIs are always unlikely
+if echo "${inFile}" | grep -qi '\.avi$' && [ `wc -c < "${inFile}"` -lt $MIN_AVI_SIZE ]; then
+	echo "Deleting unlikely AVI: ${inFile}" 1>&2
+	rm -f "${inFile}"
+	exit 3
+fi
+
 # Grab some codec info
 INFO="`~/bin/video/movInfo.pl "${inFile}" 2>/dev/null`"
 VCODECS="`echo "${INFO}" | grep VIDEO_CODEC`"
 if [ -z "${VCODECS}" ]; then
-	if echo "${inFile}" | grep -qi '\.avi$' && [ `wc -c < "${inFile}"` -lt $MIN_AVI_SIZE ]; then
-		echo "Deleting unlikely AVI: ${inFile}" 1>&2
-		rm -f "${inFile}"
-		exit 3
-	fi
 	echo "`basename "${0}"`: Could not determine video codec: ${inFile}" 1>&2
 
 	# Try to recode -- this does not return