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.74k stars 55 forks source link

Issue with emojis in file name #1

Closed twau closed 1 year ago

twau commented 1 year ago

Hi

Some of my photos have weird emojis from an old photo app. This causes immich-go to exit 1:

twau@ubuntu:~/Downloads/googletakeout$ ./immich-go -server=http://immich.localdomain:2283 -key=X-google-photos -create-albums ./Takeout
**SNIP**
2744 media scanned
file does not exist
twau@ubuntu:~/Downloads/googletakeout$ echo $?
1

File name example:

IMGMJL☣️-Sharp-_-Natural-🍀_20201225_15284769.jpg

simulot commented 1 year ago

the version in the main branch logs the files that caused the error and continue. Is it possible to share the json file? May be I can fix this problem

twau commented 1 year ago

After digging deeper into this and running with the main branch version it seems to be an issue with my google takeout I think. Photos I deleted that was taken with the app that created filenames with emojies, left behind its json file on Googles end even after being deleted, is my best guess, since I have alot of json files with "title" of an image that dosent exist in the takeout.

simulot commented 1 year ago

I have fixed a problem when the archive fits into 2 files. This fix is in release v0.1.2. Have you used that version?

The name of image is truncated (47 char without the extension), specials chars are changed into a _, sometime a space... this makes difficult to find the image after the title. I have no idea how emojis are transformed. I'll be happy to add the possibility to manage names with emojis.

simulot commented 1 year ago

@twau I have improved the way how long file names are handled. in release 0.1.5 Tell me if this work better for you

twau commented 1 year ago

Great work! My weird emojies filename no longer get the errors with 0.1.6.

simulot commented 1 year ago

I'm glad to close this one!