From 9f9ddf0342e44c66815fffa4eef2e69d2f38f222 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Tue, 18 Apr 2023 14:08:11 -0500 Subject: Line endings got changed to CRLF... fixed that and made all script commands case insensitive. --- audioconversion.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'audioconversion.sh') 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 -- cgit v1.2.3