Files
Server-scripts/audiobook_metadata/metadata_ffmpeg_series.sh
T
Lucas Vivohost 7c2e0db615 metadata scripts
album from folder: create album from foldername
read: read and display author, album, grouping of every folder
remove author before title: remove "name - " when matching author
2026-09-14 12:43:38 +02:00

31 lines
650 B
Bash
Executable File

#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <Series> [additional ffmpeg_handling.py args...]"
exit 1
fi
series="$1"
shift
for d in */; do
[ -d "$d" ] || continue
name="${d%/}"
# extract leading number (int or float)
if [[ $name =~ ([0-9]+([.,][0-9]+)?) ]]; then
num="${BASH_REMATCH[1]}"
else
continue
fi
echo Folder: $d, Number: $num
/home/lucas/scripts/.venv/bin/python \
/home/lucas/scripts/ffmpeg_handling.py \
ms "$name" \
--override \
-k grouping \
-v "$series #$num" \
"$@" > /home/lucas/metadata_set.log
# --kidflag \
done