alvistar / immich-albums

Create immich albums from folder structure
MIT License
38 stars 7 forks source link

Recursive mode might be processing folders multiple times #11

Closed lnicola closed 4 weeks ago

lnicola commented 3 months ago

This is a test with an empty directory, but on a real one it appeared to process even the parent multiple times

Processing folder: /tank/path/Folder

Album Folder does not exist
DRY RUN: Creating album Folder
DRY RUN: Assets ids: []
Processing folder: /tank/path/Folder/Subfolder

Album Subfolder does not exist
DRY RUN: Creating album Subfolder
DRY RUN: Assets ids: []
Processing folder: /tank/path/Folder/Subfolder

Album Subfolder does not exist
DRY RUN: Creating album Subfolder
DRY RUN: Assets ids: []

This might be because of the recursive call on https://github.com/alvistar/immich-albums/blob/main/src/immich_albums/im.py#L150-L154 (since os.walk is already recursive).

nothing2obvi commented 3 months ago

It's definitely doing this for me. It keeps running through the same folder over and over. However, I believe it started doing this on its 2nd run, meaning all folders were turned into albums, and then it started running through a certain folder over and over.

alvistar commented 4 weeks ago

Should be fixed with pr #16