mattdavis90 / immich-stacker

A small application to help you stack images in Immich
MIT License
5 stars 1 forks source link

Stacks images which don’t belong together. #3

Closed Burnie215 closed 2 months ago

Burnie215 commented 3 months ago

All Images with the same name get stacked together. When a new SD card is used the file ID starts counting at DSCF000001.jpg so they will be stacked with old files. A secondary property like capture date or file location would be necessary to prevent wrong stacking.

mattdavis90 commented 3 months ago

Hi, thanks for the report. I believe this is already covered however. At the bottom of the readme there is mention of an environmental variable IMMICH_COMPARE_CREATED that I think does what you ask.

Burnie215 commented 3 months ago

Haven‘t seen the additional commands. Thank you!

mattdavis90 commented 3 months ago

No problem. Let me know if it fixes your problem and I'll close this issue. Thanks

Burnie215 commented 3 months ago

Hi, i have used the variable and set it our, but it still stacks images which don't belong together. Is this the right way to use it? I haven't seen an example in your Readme..

IMMICH_ENDPOINT: "https://XXXX/api" IMMICH_MATCH: "\.(JPG|RAF)$$" IMMICH_PARENT: "\.JPG$$" IMMICH_COMPARE_CREATED: true

mattdavis90 commented 3 months ago

Hi, sorry to hear it isn't working. When the app logs to say that your images have stacked do they have a timestamp on the end of them? e.g. IMG00001_29072024.jpg

Burnie215 commented 3 months ago

Hi no there are no timestamps on the end.

mattdavis90 commented 3 months ago

Can I double check that you're running the 1.1.2 docker image or the latest binary download from Github? I've just tested locally and it should be working.

I added the following to my .env file

IMMICH_LOG_LEVEL=DEBUG
IMMICH_COMPARE_CREATED=true

and get debug messages like this

2024-07-29T21:29:03+01:00 DBG Skipped filename="035_2011-12-02 16:07:53 +0000 GMT"
2024-07-29T21:29:03+01:00 DBG Skipped filename="DSC01993_2010-08-15 14:53:17 +0100 BST"
2024-07-29T21:29:03+01:00 DBG Skipped filename="DSC01788_2010-07-03 17:32:44 +0100 BST"
2024-07-29T21:29:03+01:00 DBG Skipped filename="DSC01263_2010-05-30 23:05:37 +0100 BST"
2024-07-29T21:29:03+01:00 DBG Skipped filename="_1060717_2019-03-23 14:13:04 +0000 GMT"
Burnie215 commented 3 months ago

That's how my log looks like: 2024-07-29T20:46:07Z INF Created stack filename=DSCF3234 2024-07-29T20:46:07Z DBG Stacking filename=DSCF1528_approved 2024-07-29T20:46:07Z INF Created stack filename=DSCF1528_approved 2024-07-29T20:46:07Z DBG Skipped filename=DSC01279 2024-07-29T20:46:07Z DBG Stacking filename=DSCF2373 2024-07-29T20:46:07Z INF Created stack filename=DSCF2373 2024-07-29T20:46:07Z DBG Stacking filename=DSCF1523 2024-07-29T20:46:07Z INF Created stack filename=DSCF1523

According to this maybe I have to IMMICH_COMPARE_CREATED: "true" instead of IMMICH_COMPARE_CREATED: true https://docs.docker.com/compose/environment-variables/set-environment-variables/

mattdavis90 commented 3 months ago

Ah, I didn't test with a docker-compose file because I'm not easily set up to do so but I think that would make sense to make sure the string version of "true" gets to the environment instead of a boolean. If that works then I'll update the README file

mattdavis90 commented 2 months ago

Any update on whether putting quotes around true worked? I'll close the issue if it is working. Thanks