Skip to content

Instantly share code, notes, and snippets.

@guelau
Created September 13, 2024 10:33
Show Gist options
  • Save guelau/274d8d11766994570a1b8f450de40388 to your computer and use it in GitHub Desktop.
Save guelau/274d8d11766994570a1b8f450de40388 to your computer and use it in GitHub Desktop.
Fix id3 tags to 1.1
#!/bin/bash
DIRECTORY="$1"
FixID3 () {
iid3=$(eyeD3 -1 "$1" 2>&1 >/dev/null)
pat="*No ID3 v1.x tag found*"
if [[ $iid3 == $pat ]]; then eyeD3 --to-v1.1 "$1"; fi
}
export -f FixID3
find "$DIRECTORY" -type f -iname "*.mp3" -exec bash -c 'FixID3 "$0"' {} \;
@guelau
Copy link
Author

guelau commented Sep 13, 2024

Python audio data toolkit eyeD3 is needed

pip install eyeD3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment