Skip to content
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

Import JSON files from Google takeout #430

Closed
dlgreenwald opened this issue Feb 19, 2023 · 3 comments
Closed

Import JSON files from Google takeout #430

dlgreenwald opened this issue Feb 19, 2023 · 3 comments
Labels
feature New feature or request

Comments

@dlgreenwald
Copy link

When you utilize google takeout to collect your Google Photos content you end up with a number of JSON files. It appears that if you have edited things that would normally be in the EXIF on google photos instead of updating the file they updated a JSON sidecar. This means that when I imported into NextCloud/Memories I have a large number of photos that have ended up being dated incorrectly where I have corrected a date. The JSON file is named exactly what the image file is with an extension of .json.

Specifically I would be happy to just see Date retained from this file if it is present, but think others might find the people or geo encoding useful as well.

Here is an example JSON from google takeout.

{
  "title": "{photoname].jpg",
  "description": "",
  "imageViews": "0",
  "creationTime": {
    "timestamp": "1598032635",
    "formatted": "Aug 21, 2020, 5:57:15 PM UTC"
  },
  "photoTakenTime": {
    "timestamp": "1478174685",
    "formatted": "Nov 3, 2016, 12:04:45 PM UTC"
  },
  "geoData": {
    "latitude": 0.0,
    "longitude": 0.0,
    "altitude": 0.0,
    "latitudeSpan": 0.0,
    "longitudeSpan": 0.0
  },
  "geoDataExif": {
    "latitude": 0.0,
    "longitude": 0.0,
    "altitude": 0.0,
    "latitudeSpan": 0.0,
    "longitudeSpan": 0.0
  },
  "people": [{
    "name": "{NAME1}"
  }, {
    "name": "{NAME2}"
  }],
  "url": "{url to google content}",
  "googlePhotosOrigin": {
    "driveDesktopUploader": {
      "version": "BACKUP_AND_SYNC"
    }
  },
  "photoLastModifiedTime": {
    "timestamp": "1621834597",
    "formatted": "May 24, 2021, 5:36:37 AM UTC"
  }
}
@dlgreenwald
Copy link
Author

Honestly this is the kind of thing that could be done as a batch job, and I would be happy to take a stab at at least getting the date into the database even if the files themselves were not updated. If you could point me in the right direction database wise I would be happy to post back the script I end up with.

@pulsejet pulsejet added the feature New feature or request label Feb 20, 2023
@slkwilly19

This comment was marked as spam.

@pulsejet
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants