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

How to create a single album for a folder containing multiple folders? #19

Closed martibc16 closed 2 months ago

martibc16 commented 2 months ago

Hi!

I have a folder called /mnt/family_photos. Inside there are multiple folders:

/mnt/family_photos/2001 /mnt/family_photos/2002 /mnt/family_photos/2003 . . .

I want to create an album for said folder but I want a single family photos for all the photos inside said folder. I DON'T want an album for each subfolder inside /mnt/family_photos/. How could I do that?

Even if I set the max_depth to 1 the utility won't work for this case.

And to finish: Inside /mnt/ there are other folders other than family_photos

Salvoxia commented 2 months ago

Even if I set the max_depth to 1 the utility won't work for this case.

That depends on your choice of root_path. If there are no other folders in /mnt for which your rule should not apply, you could set root_path to /mnt. Then the default for --album-levels of 1 should yield exactly one album: family_photos.

martibc16 commented 2 months ago

Thanks @Salvoxia for the quick answer!

That depends on your choice of root_path. If there are no other folders in /mnt for which your rule should not apply, you could set root_path to /mnt. Then the default for --album-levels of 1 should yield exactly one album: family_photos.

There is another folder inside /mnt/ But since there's only one that I don't want it has been easier to create both albums and delete the one I don't want.

Thank you!

Salvoxia commented 2 months ago

That works if you only intend to create that album once and there will be no new photos to add to that album. The next time you run the script it will create the unwanted folder/album again. You could mount that specific folder family_photos to a dedicated or at least more nested location inside the Immich container. If that doesn't work either, I can think about adding --album-levels = 0, meaning it will create a single album for the deepest folder in root_path.

martibc16 commented 2 months ago

That works if you only intend to create that album once and there will be no new photos to add to that album. The next time you run the script it will create the unwanted folder/album again. You could mount that specific folder family_photos to a dedicated or at least more nested location inside the Immich container. If that doesn't work either, I can think about adding --album-levels = 0, meaning it will create a single album for the deepest folder in root_path.

Yes I'm aware of that. But for me it's a one time operation.

The --album-levels = 0, would be a great addition in my opinion.