Files
Server-scripts/audiobook_metadata_scripts/metadata_ffmpeg_series.sh
T

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