Compare commits
2 Commits
5f22dbaca4
...
8129858ffd
Author | SHA1 | Date | |
---|---|---|---|
8129858ffd | |||
19dec430cf |
@@ -243,6 +243,11 @@ function migrate_music {
|
|||||||
|
|
||||||
if [[ "$skip" == "true" ]]; then
|
if [[ "$skip" == "true" ]]; then
|
||||||
echo -e "*** Skipping, critical data missing, please add EXIF data.\n"
|
echo -e "*** Skipping, critical data missing, please add EXIF data.\n"
|
||||||
|
if [[ "$file" == "$INT_DIR"* ]]; then
|
||||||
|
echo -e "**** Moving file from $INT."
|
||||||
|
mkdir -pv "$NEW_DIR"
|
||||||
|
mv -v "$file" "$NEW_DIR/"
|
||||||
|
fi
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -268,20 +273,24 @@ find "$OLD_DIR" -type f ! -name "*".$EXT | sort | while read non_mp3; do
|
|||||||
temp_file="$INT_DIR/${temp_file//[^[:alnum:][:space:].]/}.$EXT"
|
temp_file="$INT_DIR/${temp_file//[^[:alnum:][:space:].]/}.$EXT"
|
||||||
echo "temp_file='$temp_file'"
|
echo "temp_file='$temp_file'"
|
||||||
|
|
||||||
status=""
|
if [[ -s "$temp_file" ]]; then
|
||||||
if [[ ! -s "$temp_file" ]]; then
|
echo "*** FAILED: Temporary file already exists!"
|
||||||
# Actual conversion.
|
echo "**** Please remove any failed previous runs."
|
||||||
ffmpeg -y \
|
exit 1
|
||||||
-nostdin -hide_banner -loglevel quiet \
|
|
||||||
-i "$non_mp3" "$temp_file"
|
|
||||||
status="$?"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Actual conversion.
|
||||||
|
status=""
|
||||||
|
ffmpeg -y \
|
||||||
|
-nostdin -hide_banner -loglevel quiet \
|
||||||
|
-i "$non_mp3" "$temp_file"
|
||||||
|
status="$?"
|
||||||
|
|
||||||
if [[ $status != 0 ]]; then
|
if [[ $status != 0 ]]; then
|
||||||
echo "*** FAILED: Exited with status '$status'."
|
echo "*** FAILED: Exited with status '$status'."
|
||||||
echo "**** To troubleshoot, try running this:"
|
echo "**** To troubleshoot, try running this:"
|
||||||
echo "ffmpeg -y -i \"$non_mp3\" \"$temp_file\""
|
echo "ffmpeg -y -i \"$non_mp3\" \"$temp_file\""
|
||||||
exit
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "*** Success!"
|
echo "*** Success!"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user