Kaynağa Gözat

Merge branch 'master' of github.com:profplump/UberZach-Video

Zachary Kotlarek 9 yıl önce
ebeveyn
işleme
cc7acc6cdc
2 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 1 1
      findRecode.sh
  2. 4 0
      recode

+ 1 - 1
findRecode.sh

@@ -113,7 +113,7 @@ for i in ${FILES}; do
 		continue
 		continue
 	fi
 	fi
 
 
-	# Skip files is low bitrates
+	# Skip files with low bitrates
 	SIZE="`stat -f %z "${i}" 2>/dev/null`"
 	SIZE="`stat -f %z "${i}" 2>/dev/null`"
 	if [ -z "${SIZE}" ]; then
 	if [ -z "${SIZE}" ]; then
 		SIZE=1
 		SIZE=1

+ 4 - 0
recode

@@ -99,6 +99,10 @@ if [ $KEEP_IN -eq 0 ]; then
 	if [ -e "${SRT}" ]; then
 	if [ -e "${SRT}" ]; then
 		rm -f "${SRT}"
 		rm -f "${SRT}"
 	fi
 	fi
+	RENAME="`echo "${OUT}" | sed 's%^\(.*\)-recode\(\.[^\.]*\)$%\1\2%'`"
+	if [ "${RENAME}" == "${IN}" ] && [ ! -e "${IN}" ]; then
+		mv "${OUT}" "${IN}"
+	fi
 else
 else
 	echo -e "`basename "${0}"`: Delayed error: Refusing to delete input file.\n" 1>&2
 	echo -e "`basename "${0}"`: Delayed error: Refusing to delete input file.\n" 1>&2
 fi
 fi