Closed RobLaw0304 closed 9 months ago
Here is the content of IMG_0484.JPG(1).json (you can see it still carries the base title though google renamed the image for takeout):
{ "title": "IMG_0484.JPG", "description": "", "imageViews": "3", "creationTime": { "timestamp": "1662837354", "formatted": "Sep 10, 2022, 7:15:54 PM UTC" }, "photoTakenTime": { "timestamp": "1350849177", "formatted": "Oct 21, 2012, 7:52:57 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 }, "url": "<A GOOGLE URL>", "googlePhotosOrigin": { "webUpload": { "computerUpload": { } } } }
Added #3 to address this use case.
"title": "IMG_0484.JPG"
this is so unexpected and so stupid, I really wanted to avoid filename based operations but it looks like it's not longer possible. I'll review the PR when I have some more time. Thanks!
I agree!!! Thanks for your work on this. This was by far the simplest and most effective scripted solution I found.
This is now fixed, thank you for the contribution!
If you have uploaded multiple files to Google which end up in the same folder in your Google Takeout that had the same original upload name, Google names the jpg and json files differently. This causes the google-photos-takeout.sh script to assign all identically named JSON files to the base jpg instead of a 1:1 mapping you'd expect.
Example: I have four files named IMG_0484.JPG that I upload to Google Photos. In my Google Takeout, I end up with four image files, IMG_0484.JPG, IMG_0484(1).JPG, IMG_0484(2).JPG, IMG_0484(3).JPG and four json files IMG_0484.JPG.json, IMG_0484.JPG(1).json, IMG_0484.JPG(2).json, IMG_0484.JPG(3).json,
google-photos-takeout.sh assigns as such:
This is what is expected:
This occurred for a huge number of my files since over the years many cameras from different families have been used which coincidentally had the same naming scheme.