You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
417 B

#!/bin/bash
# Find all directories two levels deep (Artist/Album) containing FLAC files
find . -type f -iname "*.flac" | \
awk -F/ 'NF>=3 {print $(NF-2) "/" $(NF-1)}' | sort -u | while read -r album_path; do
full_album_path="./$album_path"
echo "Processing album: $full_album_path"
# Run metaflac on all FLAC files in the album directory
metaflac --add-replay-gain "$full_album_path"/*.flac
done