Issue with intermittent failures to add tags using `--folder-as-tags` in `from-folder`
OS - Windows 11
I tried uploading images using --folder-as-tags in the import command for a TEST directory, consisting of TEST1 and TEST2 folders.
immich-go upload from-folder --server ... --api-key ... TEST --folder-as-tags
Expected - 2 tags to be created - TEST/TEST1 and TEST/TEST2
Actual:
- 2 tags created as expected
- TEST/TEST1 - EMPTY! (should have 10 assets)
- TEST/TEST2 - Good
I did a manual push for 1 asset that was failing, and the flow was:
- File gets uploaded in Immich
- I can see it in the tag for a split second
- Immich jobs finish running
- Tag is removed from the image
Could it be related to Storage Template being turned ON?
There is an open issue on Immich on this. There is a race condition due to concurrent access to photo's data between API access and batch tasks. The immich team is working on a better design.
In the meantime, the workaround is to pause all batch task while uploading using immich-go. The latest version 1.26.x is doing this by default.
UP UP 😁
The issue still exist in 0.28.0. Not all photos from subfolders get correctly tagged with folder path. This makes it impossible to import dozens of directories and later create albums based on subfolders, since many photos don’t contain tag information.
My example and result:
immich-go upload from-folder --server=http://xxxxxx --api-key=xxxxxxxx --folder-as-tags --manage-burst=NoStack --session-tag --tag=fromdsm /volume2/Libraries/Photos/2004/
/volume2/Libraries/Photos/2004/holidays -> 2 JPG ------- 0 photos tagged
/volume2/Libraries/Photos/2004/holidays/jack > 21 JPG ------- 16 photos tagged
/volume2/Libraries/Photos/2004/holidays/oli -> 5 JPG ------- 4 photos tagged
/volume2/Libraries/Photos/2004/winter -> 113 JPG ------- 113 photos tagged
/volume2/Libraries/Photos/2004/winter/football match -> 6 JPG ------- 0 photos tagged
Re-running the upload command doesn't change anything.