Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not scanning and loading photos from windows folder #123

Closed
nchokshi opened this issue Feb 7, 2025 · 2 comments
Closed

Not scanning and loading photos from windows folder #123

nchokshi opened this issue Feb 7, 2025 · 2 comments
Labels
stale No activity for extended period of time

Comments

@nchokshi
Copy link

nchokshi commented Feb 7, 2025

When I am running the script in Windows Docker Desktop, it successfully showing photo from the immich library but not finding images from
my mounted windows drive folder. Thanks for creating this wonderful container and looking forward for your feedback on issue.

I have folder structure
C:\Photos
IMG_8087.jpg

  • Phone
    • 2024
      • Atlantic-City
        IMG_9292.jpg
      • Bear
        IMG_0943.jpg

My docker-compose file have following code:
immich-folder-albums:
container_name: immich_folder_albums
image: ghcr.io/salvoxia/immich-folder-album-creator:latest
restart: always
depends_on:
- immich-server
volumes:
- "C:/photos:/externalssd/photos"
environment:
API_URL: ${EXTERNAL_URL}/api
API_KEY: "pEeoK4uqvmvvjtt2ieitOjjZHDIIHIDhrgecGAWco"
ROOT_PATH: /externalssd/photos
CRON_EXPRESSION: '*/1 * * * *'
ALBUM_LEVELS: 4
ALBUM_SEPARATOR: '-'
TZ: ${TZ}
Log is showing
2025-02-06 22:13:00 time=2025-02-06T22:13:00.883-05:00 level=INFO msg=Detected Immich server version 1.125.7
2025-02-06 22:13:00 time=2025-02-06T22:13:00.884-05:00 level=INFO msg=Requesting all assets
2025-02-06 22:13:00 time=2025-02-06T22:13:00.956-05:00 level=INFO msg=1 photos found
2025-02-06 22:13:00 time=2025-02-06T22:13:00.956-05:00 level=INFO msg=Sorting assets to corresponding albums using folder name
2025-02-06 22:13:00 time=2025-02-06T22:13:00.957-05:00 level=INFO msg=0 albums identified
2025-02-06 22:13:00 time=2025-02-06T22:13:00.957-05:00 level=INFO msg=Album list: []
2025-02-06 22:13:00 time=2025-02-06T22:13:00.957-05:00 level=INFO msg=Listing existing albums on immich
2025-02-06 22:13:01 time=2025-02-06T22:13:01.010-05:00 level=INFO msg=0 existing albums identified
2025-02-06 22:13:01 time=2025-02-06T22:13:01.038-05:00 level=INFO msg=Creating albums if needed
2025-02-06 22:13:01 time=2025-02-06T22:13:01.038-05:00 level=INFO msg=0 albums created
2025-02-06 22:13:01 time=2025-02-06T22:13:01.038-05:00 level=INFO msg=Done!

@Salvoxia
Copy link
Owner

Salvoxia commented Feb 7, 2025

Hi,

if I understand correctly you have one image
C:\Photos\IMG_8087.jpg
that is available the Immich container under the path
/externalssd/photos/IMG_8087.jpg
And that is most likely the one photo the script found (according to the log).

You set your ROOT_PATH to /externalssd/photos.
This is most likely the culprit. Your image is sitting directly in the ROOT_PATH. The script works the way that it cuts off the ROOT_PATH from any asset's fully qualified path. Then it removes the asset's file name from the path. What's left is used for album name generation.
The problem is that with assets sitting directly in the ROOT_PATH, there's nothing left after removing the ROOT_PATH and the file name itself from the fully qualified path. So the script cannot create an album for it.
If you move your image to for example C:\Photos\2024\My Album\IMG_8087.jpg, then the script should create an album called 2024-My Album based on your docker-compose settings.

Let me know if that helps.

Best Regards
Salvoxia

@Salvoxia
Copy link
Owner

Closing due to inactivity. Feel free to re-open if the issue persists.

@Salvoxia Salvoxia added the stale No activity for extended period of time label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No activity for extended period of time
Projects
None yet
Development

No branches or pull requests

2 participants