Skip conversion if file is still present from a previous run.
This commit is contained in:
parent
8b40fb3056
commit
349e735c04
@ -84,8 +84,15 @@ find "$OLD_DIR" -type f ! -name "*".mp3 | sort | while read file; do
|
|||||||
TEMP_FILE="${TEMP_FILE//[^[:alnum:][:space:].]/}"
|
TEMP_FILE="${TEMP_FILE//[^[:alnum:][:space:].]/}"
|
||||||
echo "$TEMP_FILE"
|
echo "$TEMP_FILE"
|
||||||
|
|
||||||
ffmpeg -y -nostdin -hide_banner -loglevel quiet -i "$file" \
|
if [[ -s "$TEMP_DIR/$TEMP_FILE" ]]; then
|
||||||
"${file//$OLD/$INT}".mp3
|
echo "*** Skipping file, already exists!"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Actual conversion.
|
||||||
|
ffmpeg -y \
|
||||||
|
-nostdin -hide_banner -loglevel quiet \
|
||||||
|
-i "$file" "${file//$OLD/$INT}".mp3
|
||||||
status="$?"
|
status="$?"
|
||||||
if [[ $status != 0 ]]; then
|
if [[ $status != 0 ]]; then
|
||||||
echo "*** FAILED: Exited with status '$status'."
|
echo "*** FAILED: Exited with status '$status'."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user