Created
June 27, 2025 18:43
-
-
Save Vocaned/4b46a8f892bb1770b7b213789ee73073 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
find .. -type f -iname "*.flac" | while read -r file; do | |
date_val=$(metaflac --show-tag=DATE "$file" | sed 's/^DATE=//') | |
originaldate_val=$(metaflac --show-tag=ORIGINALDATE "$flac_file" | sed 's/^ORIGINALDATE=//') | |
if [[ -n "$date_val" && -n "$originaldate_val" && "$date_val" != "$originaldate_val" ]]; then | |
echo "$file" | |
echo " $date_val -> $originaldate_val" | |
metaflac --remove-tag=DATE "$file" | |
metaflac --set-tag="DATE=$originaldate_val" "$file" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment