File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
google_photos_takeout_helper Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -297,12 +297,14 @@ def set_file_geo_data(file, json):
297297
298298 # fallbacks to GeoData Exif if it wasn't set in the photos editor.
299299 # https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/pull/5#discussion_r531792314
300- if longitude == 0 :
300+ longitude = float (json ['geoData' ]['longitude' ])
301+ latitude = float (json ['geoData' ]['latitude' ])
302+ altitude = json ['geoData' ]['altitude' ]
303+ # Prioritise geoData set from GPhotos editor
304+ if longitude == 0 and latitude == 0 :
301305 longitude = float (json ['geoDataExif' ]['longitude' ])
302- if latitude == 0 :
303306 latitude = float (json ['geoDataExif' ]['latitude' ])
304- if altitude == 0 :
305- altitude = float (json ['geoDataExif' ]['altitude' ])
307+ altitude = json ['geoDataExif' ]['altitude' ]
306308
307309 # latitude >= 0: North latitude -> "N"
308310 # latitude < 0: South latitude -> "S"
You can’t perform that action at this time.
0 commit comments