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.
18 lines
577 B
18 lines
577 B
#!/bin/bash
|
|
|
|
# Adds replay gain tags to the entire music library
|
|
# Run this at the root of the music library
|
|
|
|
# Directory of your music library (change this if needed)
|
|
MUSIC_DIR="."
|
|
|
|
# Find all directories two levels deep (Artist/Album) containing FLAC files
|
|
find "$MUSIC_DIR" -type f -iname "*.flac" -exec dirname {} \; | sort -u | while read -r album_path; do
|
|
full_album_path="$MUSIC_DIR/$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
|
|
|