Salvoxia / immich-folder-album-creator

Automatically create and populate albums in Immich from a folder structure in external libraries
https://hub.docker.com/r/salvoxia/immich-folder-album-creator
159 stars 9 forks source link

Album_levels is ignored #5

Closed renfie closed 5 months ago

renfie commented 5 months ago

I set the ALBUM_LEVELS variable to 2 in the Docker container, but only one album is created.

docker-compose.yml

immich-folder-album-creator: container_name: immich_folder_album_creator image: salvoxia/immich-folder-album-creator:latest restart: unless-stopped environment: API_URL: http://192.168.150.135:2283/api API_KEY: API-KEY ROOT_PATH: /usr/src/app/external ALBUM-LEVELS: "2" LOG_LEVEL: "DEBUG" CRON_EXPRESSION: "/1 *" TZ: Europe/Berlin

`time=2024-04-03T13:10:00.352+02:00 level=DEBUG msg=root_path = /usr/src/app/external time=2024-04-03T13:10:00.352+02:00 level=DEBUG msg=root_url = http://192.168.150.135:2283/api time=2024-04-03T13:10:00.352+02:00 level=DEBUG msg=api_key = APIKEY time=2024-04-03T13:10:00.352+02:00 level=DEBUG msg=number_of_images_per_request = 2000 time=2024-04-03T13:10:00.353+02:00 level=DEBUG msg=number_of_assets_to_fetch_per_request = 5000 time=2024-04-03T13:10:00.353+02:00 level=DEBUG msg=unattended = True time=2024-04-03T13:10:00.353+02:00 level=DEBUG msg=album_levels = 1 time=2024-04-03T13:10:00.353+02:00 level=DEBUG msg=album_level_separator =
time=2024-04-03T13:10:00.353+02:00 level=INFO msg=Requesting all assets time=2024-04-03T13:10:00.355+02:00 level=DEBUG msg=Starting new HTTP connection (1): 192.168.150.135:2283 time=2024-04-03T13:10:00.377+02:00 level=DEBUG msg=http://192.168.150.135:2283 "GET /api/asset?take=5000 HTTP/1.1" 200 7304 time=2024-04-03T13:10:00.378+02:00 level=DEBUG msg=Received 6 assets with chunk 1 time=2024-04-03T13:10:00.378+02:00 level=INFO msg=6 photos found time=2024-04-03T13:10:00.379+02:00 level=INFO msg=Sorting assets to corresponding albums using folder name time=2024-04-03T13:10:00.379+02:00 level=INFO msg=1 albums identified time=2024-04-03T13:10:00.379+02:00 level=INFO msg=Album list: ['Auto'] time=2024-04-03T13:10:00.379+02:00 level=INFO msg=Listing existing albums on immich time=2024-04-03T13:10:00.380+02:00 level=DEBUG msg=Starting new HTTP connection (1): 192.168.150.135:2283 time=2024-04-03T13:10:00.398+02:00 level=DEBUG msg=http://192.168.150.135:2283 "GET /api/album HTTP/1.1" 200 941 time=2024-04-03T13:10:00.399+02:00 level=INFO msg=1 existing albums identified time=2024-04-03T13:10:00.399+02:00 level=INFO msg=Creating albums if needed time=2024-04-03T13:10:00.399+02:00 level=INFO msg=0 albums created time=2024-04-03T13:10:00.399+02:00 level=INFO msg=Adding assets to albums time=2024-04-03T13:10:00.400+02:00 level=DEBUG msg=Starting new HTTP connection (1): 192.168.150.135:2283 time=2024-04-03T13:10:00.415+02:00 level=DEBUG msg=http://192.168.150.135:2283 "PUT /api/album/APIKEY/assets HTTP/1.1" 200 493 time=2024-04-03T13:10:00.415+02:00 level=INFO msg=Done!

According to the log, however, this is not taken into account. What am I doing wrong?

My folder structure for testing is:

/usr/src/app/external it contains the folder Auto/Opel and Auto/Seat

renfie commented 5 months ago

Sorry, I found my mistake. I have to use ALBUM_LEVELS and not ALBUM-LEVELS. :-)