metadata scripts add mult pattern and tag v2.4

This commit is contained in:
Lucas Serverhost authored and Lucas Vivohost committed 2026-09-14 12:43:38 +02:00
1 parent f5e6920e92
commit 14c7e69172
1 file changed
+5 -7
+5 -7
View File
@@ -41,12 +41,14 @@ for file in "${FILES[@]}"; do
[[ -z "$genre" ]] && continue
cleaned=$(printf '%s\n' "$genre" | sed -E '
s/[Aa]udio[[:space:]]*[Bb]ooks?//g
s/\b(Hörbücher?|Hoerbücher?|Hoerbuecher?|Hörspiele?|Hoerspiele?)\b//Ig
# Normalize genre names
s/\b(Sci[ -]?Fi|Science Fiction|SF)\b/SciFi/Ig
s/\bnonfiction\b/NonFiction/Ig
# Normalize separators (&, :, / -> ;)
s/\b(Sci[ -]?Fi|Science Fiction|SF)\b/Science Fiction/Ig
s/[[:space:]]*[,&:\/][[:space:]]*/;/g
# Normalize commas
@@ -64,15 +66,11 @@ for file in "${FILES[@]}"; do
status="MATCH"
if [[ "$MODE" == "--delete" ]]; then
printf "D "
kid3-cli \
-c "select-tag 1" \
-c "set genre \"$cleaned\"" \
-c "select-tag 2" \
-c "tag 2" \
-c "set genre \"$cleaned\"" \
-c save \
"$file" >/dev/null
"$file"
((MODIFIED++))
status="UPDATED"
fi