archive/a.sh

14 lines
647 B
Bash
Executable File

#!/bin/bash
FOLDER="/var/lib/gitea/music/Madeon/Madeon - Secret Sky 2020 (DJ Mix)" #your music path
METAFLAC_PATH="/usr/bin/metaflac" # you need to install "flac" (apt install flac)
for file in "$FOLDER"/*.flac; do
if [ -e "$file" ]; then
"$METAFLAC_PATH" --remove-tag=ALBUMARTIST --remove-tag=COMPILATION "$file" # Remove existing ALBUMARTIST and COMPILATION tags
"$METAFLAC_PATH" --set-tag="ALBUMARTIST=Various Artists" --set-tag="COMPILATION=1" "$file" # Set new ALBUMARTIST and COMPILATION tags
echo "Tags updated for $file."
else
echo "No FLAC files found in the folder."
exit 1
fi
done