Skip to content

Google Photos: photoTakenTime is not passed to Immich when updating server asset #846

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

Open
hakong opened this issue Mar 29, 2025 · 4 comments
Labels
bug Something isn't working waiting user reply

Comments

@hakong
Copy link

hakong commented Mar 29, 2025

I'm importing a Google Photos takeout to Immich using immich-go.
In some cases, the image was already in Immich, but immich-go uploaded it anyway. That's fine, but immich-go should probably update the date in Immich using the associated supplemental-metadata.json

The file previously exist in Immich but didn't show up in my gallery for yesterday, which probably means it had the correct (or correct-ish) timestamp.

Image taken date: 2014-04-04 09:12:11 (correct date)

immich-go processed image: file stat, mediainfo, checksum and supplemental-metadata:

root@xx:/datapool/immich/Takeout/Google Photos/Photos from 2014# stat '2014-04-04 09.12.11.jpg'
  File: 2014-04-04 09.12.11.jpg
  Size: 125944          Blocks: 257        IO Block: 125952 regular file
Device: 0,67    Inode: 400247      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1011/ UNKNOWN)   Gid: ( 1011/ UNKNOWN)
Access: 2025-03-29 10:13:50.190701105 +0000
Modify: 2025-03-28 16:27:09.000000000 +0000
Change: 2025-03-29 09:45:59.607143719 +0000
 Birth: 2025-03-28 22:47:08.502818588 +0000
root@xx:/datapool/immich/Takeout/Google Photos/Photos from 2014#

root@xx:/datapool/immich/Takeout/Google Photos/Photos from 2014# mediainfo '2014-04-04 09.12.11.jpg'
General
Complete name                            : 2014-04-04 09.12.11.jpg
Format                                   : JPEG
File size                                : 123 KiB

Image
Format                                   : JPEG
Width                                    : 1 080 pixels
Height                                   : 1 920 pixels
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Compression mode                         : Lossy
Stream size                              : 123 KiB (100%)

root@xx:/datapool/immich/Takeout/Google Photos/Photos from 2014# sha256sum "2014-04-04 09.12.11.jpg"
615cde1184f60c54a7c775b57237ecfbf10ac099bdcee8e84e2930d83766c2a1  2014-04-04 09.12.11.jpg

root@xx:/datapool/immich/Takeout/Google Photos/Photos from 2014# cat 2014-04-04\ 09.12.11.jpg.supplemental-metadata.json
{
  "title": "2014-04-04 09.12.11.jpg",
  "description": "",
  "imageViews": "7",
  "creationTime": {
    "timestamp": "1530660230",
    "formatted": "3 Jul 2018, 23:23:50 UTC"
  },
  "photoTakenTime": {
    "timestamp": "1396602731",
    "formatted": "4 Apr 2014, 09:12:11 UTC"
  },
  "geoData": {
    "latitude": 0.0,
    "longitude": 0.0,
    "altitude": 0.0,
    "latitudeSpan": 0.0,
    "longitudeSpan": 0.0
  },
  "url": "https://photos.google.com/photo/AF1QipNVhZXfsA8qKpG9CRemTdK8b5AgpnBFKYSPwR3o",
  "googlePhotosOrigin": {
    "driveDesktopUploader": {
      "version": "BACKUP_AND_SYNC"
    }
  }
}

Screenshot from Immich:
Image

Screenshot from Google Photos:
Image

Relevant logs:

2025-03-29 09:53:08 INF immich-go version:0.25.0,  commit:561f56503aa27b5d5870315cfa1a787e3b745dd4, date:2025-03-22T15:56:48Z
2025-03-29 09:53:08 INF Running environment: architecture=amd64 os=linux
2025-03-29 09:53:08 INF Command: immich-go upload from-google-photos
2025-03-29 09:53:08 INF Flags:
2025-03-29 09:53:08 INF  --api-key=**************************************yYFo
2025-03-29 09:53:08 INF  --api-trace=false
2025-03-29 09:53:08 INF  --ban-file='@eaDir/', '@__thumb/', 'SYNOFILE_THUMB_*.*', 'Lightroom Catalog/', 'thumbnails/', '.DS_Store/', '/._*', '.photostructure/'
2025-03-29 09:53:08 INF  --client-timeout=5m0s
2025-03-29 09:53:08 INF  --date-range=unset
2025-03-29 09:53:08 INF  --device-uuid=container-2.domain.com
2025-03-29 09:53:08 INF  --dry-run=false
2025-03-29 09:53:08 INF  --exclude-extensions=
2025-03-29 09:53:08 INF  --from-album-name=
2025-03-29 09:53:08 INF  --help=false
2025-03-29 09:53:08 INF  --include-archived=true
2025-03-29 09:53:08 INF  --include-extensions=
2025-03-29 09:53:08 INF  --include-partner=true
2025-03-29 09:53:08 INF  --include-trashed=false
2025-03-29 09:53:08 INF  --include-type=
2025-03-29 09:53:08 INF  --include-unmatched=false
2025-03-29 09:53:08 INF  --include-untitled-albums=false
2025-03-29 09:53:08 INF  --log-file=/home/immich/.cache/immich-go/immich-go_2025-03-29_09-53-08.log
2025-03-29 09:53:08 INF  --log-level=INFO
2025-03-29 09:53:08 INF  --log-type=text
2025-03-29 09:53:08 INF  --manage-burst=NoStack
2025-03-29 09:53:08 INF  --manage-epson-fastfoto=false
2025-03-29 09:53:08 INF  --manage-heic-jpeg=NoStack
2025-03-29 09:53:08 INF  --manage-raw-jpeg=NoStack
2025-03-29 09:53:08 INF  --no-ui=false
2025-03-29 09:53:08 INF  --on-server-errors=stop
2025-03-29 09:53:08 INF  --partner-shared-album=
2025-03-29 09:53:08 INF  --people-tag=true
2025-03-29 09:53:08 INF  --server=https://im.domain.com
2025-03-29 09:53:08 INF  --session-tag=false
2025-03-29 09:53:08 INF  --skip-verify-ssl=false
2025-03-29 09:53:08 INF  --sync-albums=true
2025-03-29 09:53:08 INF  --tag=[]
2025-03-29 09:53:08 INF  --takeout-tag=true
2025-03-29 09:53:08 INF  --time-zone=
2025-03-29 09:53:08 INF Arguments:
2025-03-29 09:53:08 INF   "/net/172.21.21.1/datapool/immich/Takeout/"
2025-03-29 09:53:08 INF Connection to the server https://im.domain.com
2025-03-29 09:53:08 INF Server status: OK
2025-03-29 09:53:08 INF Server information: version=v1.130.3
2025-03-29 09:53:08 INF Connected, user: <redacted>@gmail.com, ID: 751f4156-4a77-443e-8b98-2b5870ac4b84


[....]


2025-03-29 09:53:19 INF scanned image file file=Takeout:Google Photos/Photos from 2014/2014-04-04 09.12.11.jpg
2025-03-29 09:53:19 INF scanned sidecar file file=Takeout:Google Photos/Photos from 2014/2014-04-04 09.12.11.jpg.supplemental-metadata.json type=asset metadata title=2014-04-04 09.12.11.jpg date=2014-04-04 09:12:11
2025-03-29 09:54:45 INF associated metadata file file=Takeout:Google Photos/Photos from 2014/2014-04-04 09.12.11.jpg json=2014-04-04 09.12.11.jpg.supplemental-metadata.json matcher=matchNormal
2025-03-29 10:13:50 INF server's asset upgraded with the input file=Takeout:Google Photos/Photos from 2014/2014-04-04 09.12.11.jpg
2025-03-29 10:13:50 INF Tagged file=Takeout:Google Photos/Photos from 2014/2014-04-04 09.12.11.jpg tag=Takeout

Here is the original file uploaded to immich previously using the 'immich' command line tool:

root@xx:/mnt/datapool/xxx/xxx/Camera Uploads# mediainfo "./Camera Uploads-2014-07-04/2014-04-04 09.12.11.jpg"
General
Complete name                            : ./Camera Uploads-2014-07-04/2014-04-04 09.12.11.jpg
Format                                   : JPEG
File size                                : 118 KiB

Image
Format                                   : JPEG
Width                                    : 1 080 pixels
Height                                   : 1 920 pixels
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Compression mode                         : Lossy
Stream size                              : 118 KiB (100%)


root@xx:/mnt/datapool/xxx/xxx/Camera Uploads# stat "./Camera Uploads-2014-07-04/2014-04-04 09.12.11.jpg"
  File: ./Camera Uploads-2014-07-04/2014-04-04 09.12.11.jpg
  Size: 120870          Blocks: 240        IO Block: 121344 regular file
Device: 0,43    Inode: 14498       Links: 1
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/ UNKNOWN)   Gid: (    0/    root)
Access: 2025-03-29 11:02:02.211038415 +0000
Modify: 2014-04-04 09:12:11.000000000 +0000
Change: 2018-07-01 00:47:46.815701594 +0000
 Birth: 2018-05-19 23:40:17.833927070 +0000

root@xx:/mnt/datapool/xxx/xxx/Camera Uploads# sha256sum "./Camera Uploads-2014-07-04/2014-04-04 09.12.11.jpg"
2da32f2311274613b2531f1e7d63e4b4e7203110e2e4c71242273c6fc4c44fca  ./Camera Uploads-2014-07-04/2014-04-04 09.12.11.jpg
@simulot simulot added the bug Something isn't working label Mar 29, 2025
@hakong
Copy link
Author

hakong commented Mar 29, 2025

edit: sorry, accidentally closed. re-opened.

@hakong hakong closed this as completed Mar 29, 2025
@hakong hakong reopened this Mar 29, 2025
@simulot
Copy link
Owner

simulot commented Apr 5, 2025

I need more details on you case.
Could you re-run the import in same conditions but with --log-level=DEBUG --api-trace and share the logs?

Alternatively, could you share in a ZIP file:

  • the initially loaded file
  • the JSON and the file from the takeout

I'll replay the sequence on my test server

@hakong
Copy link
Author

hakong commented Apr 5, 2025

It's probably better you reproduce this. In the meantime you responded I have found the originals, removed all problematic images from Immich and re-uploaded the originals with correct metadata.

immich-debug-issue846.zip

@simulot
Copy link
Owner

simulot commented Apr 5, 2025

Thank you, I'll check that soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting user reply
Projects
None yet
Development

No branches or pull requests

2 participants