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

Root path with spaces in it are not recognized #30

Closed kftb closed 1 month ago

kftb commented 1 month ago

Hi!

Trying to get this amazing script going but I have issues with the root path. Since it is an external library, the folder names unfortunately have spaces in them. I haven't been able to get it to work correctly.

Tried: Putting the path in quotes: ROOT_PATH: "/pictures/00_Pictures_MASTER/00_Sortierte Bilder/" - It completely ignores the root path and creates folder name with the whole name in it (example: "pictures 00_Pictures_MASTER 00_Sortierte 2009" (note the missing "Bilder" after "Sortierte" where the space is)

Without the quotes: ROOT_PATH: /pictures/00_Pictures_MASTER/00_Sortierte Bilder/ - It does the same and ignores the root path (example album: " pictures 00_Pictures_MASTER 00_Sortierte 2009")

Without the folder with a space in it ROOT_PATH: /pictures/00_Pictures_MASTER/ - this one works as expected and creates paths from this folder onwards (example album: "00_Sortierte Bilder 2005")

If I try to just put the folder with the spaces in quotes: ROOT_PATH: /pictures/00_Pictures_MASTER/"00_Sortierte Bilder"/ the script fails completely.

same if I try to escape it: ROOT_PATH: /pictures/00_Pictures_MASTER/00_Sortierte\ Bilder/

Am I missing something obvious? I would rather not have to rename folders to avoid spaces.

Salvoxia commented 1 month ago

Hi,

I did find an issue with parsing of the ROOT_PATH environment variable when using the Docker image. I just pushed a fix for that to the main branch. Could you please test if using the latest image tag resolves your issue? Remember to force pull if you have used the latest tag before.

Best Regards, Salvoxia

kftb commented 1 month ago

Hi! Thank you for taking a look so quickly and for pushing the fix. It's working now perfectly.