1
0
Fork 0
Added option to pass multiple root paths as comma separated list in ROOT_PATH
This commit is contained in:
Salvoxia 2024-04-09 21:16:38 +02:00
parent bab2171caf
commit 94ea9c363b

18
docker/immich_auto_album.sh Executable file → Normal file
View file

@ -1,6 +1,22 @@
#!/usr/bin/env sh
args="-u $ROOT_PATH $API_URL $API_KEY"
# parse comma separated root paths
root_paths=$(echo "$ROOT_PATH" | tr "," "\n")
main_root_path=""
additional_root_paths=""
for path in ${root_paths}; do
if [ -z "$main_root_path" ]; then
main_root_path="$path"
else
additional_root_paths="-r $path $additional_root_paths"
fi
done
args="$main_root_path $API_URL $API_KEY"
if [ ! -z "$additional_root_paths" ]; then
args="$additional_root_paths $args"
fi
if [ ! -z "$ALBUM_LEVELS" ]; then
args="-a $ALBUM_LEVELS $args"