瀏覽代碼

Wrap external subtitles when available

Zachary Kotlarek 14 年之前
父節點
當前提交
16fd30c691
共有 1 個文件被更改,包括 5 次插入 和 1 次删除
  1. 5 1
      recode

+ 5 - 1
recode

@@ -85,9 +85,13 @@ else
 	fi
 fi
 
-# Remove the input file if all is well
+# Remove the input file(s) if all is well
 if [ $KEEP_IN -eq 0 ]; then
 	rm -f "${IN}"
+	SRT="`echo "${IN}" | sed 's%\.[^\.]*$%%'`.srt"
+	if [ -e "${SRT}" ]; then
+		rm -f "${SRT}"
+	fi
 else
 	echo -e "`basename "${0}"`: Delayed error: Refusing to delete input file.\n" 1>&2
 fi