commit 851711dc08d994a2658e6f1a5033a133d67d6e04 parent c42ab4ba69cfe32034684d2a34fe2e8e881e5cdf Author: Alex Balgavy <alex@balgavy.eu> Date: Sun, 21 Apr 2024 19:54:56 +0200 mlm: more character replacements when organizing tracks Diffstat:
M | scripts/mlm | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/mlm b/scripts/mlm @@ -165,9 +165,9 @@ organize_files() { mkdir -p _failed find "$src" -name '*.mp3' 2>/dev/null | \ while read -r i; do - artist="$(ffprobe -loglevel error -show_entries format_tags=album_artist -of default=noprint_wrappers=1:nokey=1 "$i" | tr -d ':' | tr '/+!@#$%^&*:?"\\>' '_' | sed 's/\.\.*$//' | perl -Mopen=locale -Mutf8 -pe 's/[\x{0300}-\x{036F}]//g')" + artist="$(ffprobe -loglevel error -show_entries format_tags=album_artist -of default=noprint_wrappers=1:nokey=1 "$i" | tr -d ':' | tr '/+!@#$%^&*:?"|\\>' '_' | sed 's/\.\.*$//' | perl -Mopen=locale -Mutf8 -pe 's/[\x{0300}-\x{036F}]//g')" [ -n "$artist" ] || { mv "$i" _failed/ && continue; } - album="$(ffprobe -loglevel error -show_entries format_tags=album -of default=noprint_wrappers=1:nokey=1 "$i" | tr -d ':' | tr '+!@#$%^&*:?>\\/"' '_' | sed 's/\.\.*$//' | perl -Mopen=locale -Mutf8 -pe 's/[\x{0300}-\x{036F}]//g')" + album="$(ffprobe -loglevel error -show_entries format_tags=album -of default=noprint_wrappers=1:nokey=1 "$i" | tr -d ':' | tr '+!@#$%^&*:?>|\\/"' '_' | sed 's/\.\.*$//' | perl -Mopen=locale -Mutf8 -pe 's/[\x{0300}-\x{036F}]//g')" [ -n "$album" ] || { mv "$i" _failed/ && continue; } fname="$(printf '%s' "${i##*/}" | perl -Mopen=locale -Mutf8 -pe 's/[\x{0300}-\x{036F}]//g')" mkdir -p "$artist/$album"