dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 44f164ae27b1b9a96bc6c661be3e48938a95914b
parent f920b3ce6d8a8b533cd723c8a132ccab599727fc
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Sat,  2 Jan 2021 11:43:13 +0100

mp3-tags-to-folders: replace special characters

Diffstat:
Mscripts/mp3-tags-to-folders | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mp3-tags-to-folders b/scripts/mp3-tags-to-folders @@ -8,9 +8,9 @@ cd "$1" || die "Could not cd to $1" mkdir -p _failed || die "Directory ./_failed already exists" find . -name "*.mp3" 2>/dev/null | \ while read -r i; do - artist="$(ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 "$i")" + artist="$(ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 "$i" | tr -d ':' | tr '!@#$%^&*:?' '_')" [ $? -eq 0 ] || { mv "$i" _failed/ && continue; } - album="$(ffprobe -loglevel error -show_entries format_tags=album -of default=noprint_wrappers=1:nokey=1 "$i")" + album="$(ffprobe -loglevel error -show_entries format_tags=album -of default=noprint_wrappers=1:nokey=1 "$i" | tr -d ':' | tr '!@#$%^&*:?' '_')" [ $? -eq 0 ] || { mv "$i" _failed/ && continue; } mkdir -p "$artist/$album" mv "$i" "$artist/$album"