simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.82k stars 55 forks source link

Wrong creation date results in false album assignment #392

Closed muety closed 3 months ago

muety commented 3 months ago

When importing from Google Photos, I ended up with albums containing photos that shouldn't actually be part of the album. I realized that this occurs when file name and creation date of the photos match, which is fair enough as an identifier. However, the date is wrong and doesn't match the actual creation date (as according to the metadata).

Here's an example of two photos. The first one got assigned to the album correctly, the second one is a false positive:

Screenshot from 2024-07-19 15-28-04 Screenshot from 2024-07-19 15-28-12

And these's are the metadata files from the takeout:

DSC_0032.jpg.json

DSC_0032.jpg.json

Notice how both photos end up with the same date on Immich, even though they were taken on entirely different days.

This is the command I used for the import:

immich-go -server http://localhost:2283 -key redacted upload -date=2024 -exclude-files=redacted1/ -google-photos takeout-*.zip

Did I miss something? Might also be a fault in my understanding of how to use the tool :man_shrugging:

simulot commented 3 months ago

You're right...

Google Photos archives are full of oddities... Look at https://github.com/simulot/immich-go/blob/main/docs/google-takeout.md This combined by the poor file naming increase the difficulty.

I'm working on similar cases. I can check you case. Send me logs to my discord @simulot Could you add the result of the following command:

for f in *.zip; do echo "$f: "; unzip -l $f; done >list.lst
muety commented 3 months ago

Did you have time to look into this already? Let me know if I can support.

simulot commented 3 months ago

Yes, I did. I think I have fixed it.

muety commented 3 months ago

Is the fix pushed yet?

simulot commented 3 months ago

The fix is pushed And thank you for your sponsorship 👍🏼