diff options
author | Joshua Drake <joshua.drake@ditchwitch.com> | 2023-04-18 14:08:11 -0500 |
---|---|---|
committer | Joshua Drake <joshua.drake@ditchwitch.com> | 2023-04-18 14:08:11 -0500 |
commit | 9f9ddf0342e44c66815fffa4eef2e69d2f38f222 (patch) | |
tree | 8cb1c9a44dd5507505ca9b550b51a1efc928f433 /audioconversion.sh | |
parent | 20b176d520a2deb587a28236bdf04273d85e3640 (diff) |
Line endings got changed to CRLF... fixed that and made all script commands case insensitive.
Diffstat (limited to 'audioconversion.sh')
-rw-r--r-- | audioconversion.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/audioconversion.sh b/audioconversion.sh index 083cb19..1b29f86 100644 --- a/audioconversion.sh +++ b/audioconversion.sh @@ -13,14 +13,8 @@ d1=${dir#"$1"} mkdir -v "$2$d1" done -#Rename files in accordance with our template -find "$1" -mindepth 2 -name '*.flac' -o -name '*.m4a' -o -name '*.wav' -o -name '*.mp4' -o -name '*.mp3' | while read -r track; -do - trackrename "--format=%(track_number)2.2d - %(track_name)s.%(suffix)s" "$track" -done - #Remove potential charset conflicts -find "$1" -type f -name '*.flac' -o -name '*.m4a' -o -name '*.wav' -o -name '*.mp4' -o -name '*.mp3' | while read -r track; +find "$1" -type f -iname '*.flac' -o -iname '*.m4a' -o -iname '*.wav' -o -iname '*.mp4' -o -iname '*.mp3' | while read -r track; do song=$(basename "$track") path=$(dirname "$track") @@ -85,4 +79,10 @@ find "$1" -type f -iname '*.flac' -printf '%h\n' | sort -u | while read -r dir else echo "$2${dir#"$1"} Contains an equal number of mp3s..." fi - done
\ No newline at end of file + done + + #Rename files in accordance with our template +find "$2" -mindepth 1 -iname '*.flac' -o -iname '*.m4a' -o -iname '*.wav' -o -iname '*.mp4' -o -iname '*.mp3' | while read -r track; +do + trackrename "--format=%(track_number)2.2d - %(track_name)s.%(suffix)s" "$track" +done
\ No newline at end of file |