An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
AGPL-3.0 License
Bot releases are hidden (Show)
Published by simulot 11 months ago
The Google takeout archive is full of traps. The difficulty is to associate all images with a JSON.
Now more files are now imported. There still few missing files, but they are now listed.
The program now reports how files are handled, or discarded.
Upload report:
53998 scanned files
53993 handled files
26937 metadata files
535 uploaded files on the server
49 upgraded files on the server
1540 duplicated files in the input
8382 files already on the server
77 discarded files because in folder failed videos
1 discarded files because of options
16470 discarded files because server has a better image
1 files type not supported
1 errors
5 files without metadata file
7 files can't be handled
File: Takeout/Google Photos/Photos from 2019/1556189729458-8d2e2d13-bca5-467e-a242-9e4cb238e(1).jpg
File unhandled, missing JSON
File: Takeout/Google Photos/Photos from 2022/original_1d4caa6f-16c6-4c3d-901b-9387de10e528_P(1).jpg
File unhandled, missing JSON
File: Takeout/Google Photos/Photos from 2022/original_af12c386-e334-4c57-88be-fdfadea71f16_P(1).jpg
File unhandled, missing JSON
File: Takeout/Google Photos/Photos from 2022/original_ec8d7b93-cbec-49c8-8707-38841db5e37d_P(1).jpg
File unhandled, missing JSON
File: Takeout/Google Photos/Photos from 2023/original_d3671642-c937-49c0-917a-8ef9cbb449c5_P(1).jpg
File unhandled, missing JSON
File: Takeout/Google Photos/user-generated-memory-titles.json
Error , json: cannot unmarshal array into Go struct field GoogleMetaData.title of type string
File: Takeout/archive_browser.html
File type not supported
Done.
The plenty of rules for associating image to JSON are somewhat contradictory. I have to rethink the system for applying
rules from the most common to the strangest ones.
Still lot of work to deliver.
Published by simulot 11 months ago
Published by simulot 11 months ago
Published by simulot 11 months ago
Published by simulot 11 months ago
Published by simulot 11 months ago
Published by simulot 12 months ago
The option -create-stacks <bool>
drive the creation of stack of images for couples JPG/RAW or bursts of photos. The option is enabled by default.
Your asset must have the date of capture in the metadata.
Example:
./immich-go -server=http://mynas:2283 -key=zzV6k65KGLNB9mpGeri9n8Jk1VaNGHSCdoH1dY8jQ upload
~/mnt/sdcard/
Server status: OK
Ask for server's assets...
....
Done, total 12 uploaded
Creating stacks
Stacking 3H2A0018.CR3, 3H2A0018.JPG...
Stacking 3H2A0019.CR3, 3H2A0019.JPG...
Stacking 3H2A0020.CR3, 3H2A0020.JPG...
Stacking 3H2A0021.CR3, 3H2A0021.JPG...
Stacking 3H2A0022.CR3, 3H2A0022.JPG...
Stacking 3H2A0023.CR3, 3H2A0023.JPG...
12 media scanned, 12 uploaded.
Done.
Published by simulot 12 months ago
Published by simulot 12 months ago
Published by simulot 12 months ago
This release introduce add the command `stack' to group jpg/raw images together or all images of a burst.
Now freebsd binaries are released.
Published by simulot 12 months ago
Published by simulot 12 months ago
Published by simulot about 1 year ago
Published by simulot about 1 year ago
Published by simulot about 1 year ago
Published by simulot about 1 year ago
Published by simulot about 1 year ago
Published by simulot about 1 year ago
The takeout archive has flaws making the import task difficult and and error prone.
I have rewritten this part of the program to fix most of encountered error.
Some image may miss from the album's folder. Those images files are located into the year folder.
This fix looks for album images in the whole archive.
Iphones and digital cameras produce images with the sequence number of 4 digits. This leads inevitably to have several images with the same number in the the year folder.
Google Photos disambiguates the files name by adding a counter at the end of the image file:
Surprisingly, matching JSON are named as
This special case is now handled.
Untitled albums now are named after the album's folder name.
This address partially the issue #19.
The refactoring of the code don't use anymore a file pattern to find files in the archive.
The image and the JSON file are quite identical, except for duplicate image (see #12) or when the file name is too long (how long is too long?).
Now, the program takes the image name, check if there is a JSON that matches, open it and use the title of the image to name the upload.
If the JSON isn't found, the image is uploaded with it's name in the archive, and with no date. Now all images are uploaded to immich, even when the JSON file is not found.
Immich-go now accepts the same list of extension as the immich-server. This list is taken from the server source code.
The duplicate checker now uses the file name, its extension and the date of take to detect duplicates.
So the system doesn't signal IMG_3479.JPG
and IMG_3479.CR2
as duplicate anymore.
The date parsing now takes into account the time zone of the machine (ex: Europe/Paris). This handles correctly summer time and winter time.
This isn't yet tested on Window or Mac machines.
Published by simulot about 1 year ago
Published by simulot about 1 year ago