diff --git a/AAXtoMP3 b/AAXtoMP3 index cf22488..89848b4 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -112,25 +112,24 @@ normalize_whitespace() { echo $* } -for path -do - debug "Decoding ${path} with auth code ${auth_code}..." +create_path(){ + debug "Decoding $1 with auth code $2..." - save_metadata "${path}" + save_metadata "$1" genre=$(get_metadata_value genre) artist=$(get_metadata_value artist) title=$(get_metadata_value title | sed 's/'\:'/'\ -'/g' | xargs -0) - output_directory="$(dirname "${path}")/${genre}/${artist}/${title}" + output_directory="$(dirname "$1")/${genre}/${artist}/${title}" mkdir -p "${output_directory}" full_file_path="${output_directory}/${title}.${extension}" -